Step 0. Create a file named ~/.ssh/config
Step 1-1st, SSH can be configured with both host names and their identity files.
Host server1.remote.host
IdentityFile ~/.ssh/server1.remote.host.privatekey
Host server2.remote.host
IdentityFile ~/.ssh/server2.remote.host.privatekey
IdentityFile ~/.ssh/server2.remote.host.privatekey
$ vi config
Type the followings...
IdentityFie ~/.ssh/id_dsa_%h_%r
IdentityFie ~/.ssh/id_rsa_%h_%r
IdentityFie ~/.ssh/id_dsa
IdentityFie ~/.ssh/id_rsa
Save and quit.
$ssh username@remote.host
=> SSH client will try to read the private key at one of the following files
~/.ssh/id_dsa_remote.host_username
~/.ssh/id_rsa_remote.host_username
~/.ssh/id_dsa
~/.ssh/id_rsa
No comments:
Post a Comment