Posts

Showing posts from April, 2020

Convenient SSH

If you are like me, then you might have a few machines around the house, or the office, into which you need to SSH frequently. Over time I accumulated a few ways to make this experience more convenient, without sacrificing security and I wanted to share these here: Specify the login user You might log into your SSH servers with usernames that are not the same as the one you use on your local system, the client. For example, your username might be john but you want to log into a raspberry pi server using the pi username. Now typically you would need to specify that username in the command line, e.g.: ssh pi@192.168.0.100 However, using ~/.ssh/config you can set which username should be used if no other one is specified, e.g.: Host 192.168.0.100 User pi Now you can simply say: ssh 192.168.0.100 You will be logging in as “pi”, unless you explicitly specify a different username. Give your stations a name This might be obvious, but typing IP addresses can be tedious and...