I am beginning work with a remote host. They require a "SSH KEY" from my server. How can I create a SSH Key that they can use to allow connections from my server? I would like to assign the key to a specific SSH user on my server if possible.
I'm just worried about granting them access to my server. They shouldn't have access to mine, but I should have access to theirs. How can I generate a key to achieve this?
I don't know if it helps, but I have Ubuntu 12.04
Best Answer
You can use ssh-keygen to do this
answer the questions or accept the defaults then provide a passphrase for the private key.
Now send the pubic key (id_rsa.pub) to the remote host as they request.
Put the private key in ~/.ssh/id_rsa for the user that you want to access the remote host. Ensure the perms on the .ssh directory are 700 and ~/.ssh/id_rsa is 600.
You should be good to go.
Send the
id_rsa.pub
to the remote host where is should be put in the user's~/.ssh/authorized_keys
with permissions600
or644
at most.