Refs:

Manually indicate which identity private key to use when connecting:

ssh -i /backup/home/user/.ssh/myid user@unixserver1.nixcraft.com

or specify it in the ssh config to automatically be used when connecting to that specific host.

nano ~/.ssh/config
Host server1.nixcraft.com
  IdentityFile ~/backups/.ssh/id_dsa
Host server2.nixcraft.com
  IdentityFile /backup/home/userName/.ssh/id_rsa

To add other options see man pages under -o

For persistent local tunnels we can do something like this for an entry for example:

Host server2.nixcraft.com
  IdentityFile /backup/home/userName/.ssh/id_rsa
  LocalForward 31999 localhost.localdomain:31999


blog comments powered by Disqus

Published

April 4 2015    -    22:17

Tags