ssh config file

Hello all

I have question regarding the id_dsa keys and authorized_keys file in .ssh directory.
I know if we try to SFTP, id_dsa.pub file on server1 will be verified with contents of authorized_keys on other server and SFTP will happen once verification passes.

No i want to use id_dsa1.pub and copy these contents to authorized_keys1.
When i run th SFTP id_dsa1.pub need to beused for verificatio instead of id_dsa.pub I beleive we can do this by modifiying the config file.

Where can i find the config file. How can i modify it so that SFTP uses the file which i specify in config file.

All the public keys should always be in the ~/.ssh/authorized_keys file on the server-end.
The client-end of the ssh/sftp connection will negotiate with the server-end based on the private keys that it has in its ~/.ssh directory and see which one can be used.

So, if you need to use id_rsa/id_rsa.pub from server1 to server2 and id_rsa1/id_rsa1.pub from server3 to server2. You would do the following:

  1. concatenate id_rsa.pub to ~/.ssh/authorized_keys on server2
  2. concatenate id_rsa1.pub to ~/.ssh/authorized_keys on server2
  3. keep id_rsa in ~/.ssh directory on server1
  4. keep id_rsa1 in ~/.ssh directory on server3

ssh/sftp should take care of the rest.