How did I miss this for all these years I've used ssh?
~/.ssh/config lets you type
#ssh homeinstead of
#finn@84.215.xxx.xxx -p 10001
Here is the ~/.ssh/config
Host home
HostName 84.215.xxx.xxx
Port 10001
User finn
Combine this passwordless ssh with
ssh-copy-id -i ~/.ssh/id_rsa.pub finn@84.215.xxx.xxx
and phoning home is pretty effortless.
... another one of those note-to-future-Finn (tm) posts which I'll copy and paste stuff from.
Two more nice things you can set:
ReplyDeleteForwardX11 yes
(to forward x)
And, as i learned today, use aliases for example
Host test dev stage prod
User finn
HostName %s.blogspot.no
You can also specify what identity file you want to use per host
ReplyDeleteHost home
HostName 84.215.xxx.xxx
Port 10001
User finn
IdentityFile ~/.ssh/id_rsa.pub
$ ssh home