A simple SSH config file

openbsd.png

You can provide ssh with a config file if you’re connecting to many different machines with different ports, user names etc.

Create a file called “config” in your .ssh directory on your machine. This file can contain entries such as

Host Home
User chris
Port 8888
HostName chrisonline.com

Host Office
User myseriousname
Port 22
HostName machine.atwork.com

What you can do then is just type “ssh Home”and ssh will automatically pick the right user name, machine and port. This is very convenient if you have different user names on different machines.

Related Posts

Comments are closed.