In this Quick Tip, I’ll show you how to leverage the hidden .ssh/config file in Linux or macOS, to define custom configuration for your frequently-accessed ssh sessions! Stop typing usernames (AND passwords, if you check out my Quick Tip on RSA key authentication.. that’s easy too!!) Check out the video below, and then come back to grab the sample config file, and start managing your ssh sessions like a pro!
Here’s your sample config file to drop in your .ssh folder. Remember to modify for your servers and usernames of course!
Host 192.168.*.* 10.*.*.* *docker* !192.168.2.225
StrictHostKeyChecking no
UserKnownHostsFile=/dev/null
User webserver
Host rockpi*
StrictHostKeyChecking no
UserKnownHostsFile=/dev/null
User omg
Host 192.168.2.225 raspberrypi
StrictHostKeyChecking no
UserKnownHostsFile=/dev/null
User pi
Recent Comments