How to add private key to SSH?
So, when connecting to host remotehost
, you want to use the key contained in upperstorey?
You need to tell ssh to use it explicitly. The easiest way of doing so is adding the following block to your ~/.ssh/config:
Host remotehost
IdentityFile ~/.ssh/upperstorey
This tells ssh
to use that key when connecting to that host. Add any aliases to the Host line (i.e. remotehost, remotehost.remotedomain.com, etc)