Confused on ssh key pairs
I have tested the following:
What if i want to setup an SFTP server and i created a priv and pub key with user1@server1. and i want give give someone sftp access to user1 by using a key pair and not a password. I cannot request server2's public key and import it in mine; i want to give them a key that he can use to authenticate to server1. how can i achieve this? |
Each user+client+server tuple should have its own key pair.
Check "man ssh-keygen" for the -f and -C options. The -f allows you to give the files useful names and the -C allows you to put useful comments inside the key. That way you or they can have more than one key pair kicking around. They can generate the key pair themselves: Code:
cd ~/.ssh/ Then they can send you the file ~/.ssh/server2_ed25519_key.pub via e-mail or USB stick and you can install it in the user1 account at server1. The public key is public so you don't have to worry that much about keeping it hidden and e-mail is fine. The private key is a different matter and they should keep it very safe on their system. |
In addition you can have multiple public keys in the same users authorized_keys file.
|
All times are GMT -5. The time now is 03:45 AM. |