Search code examples
linuxsshkeyssh-keys

Own SSH key file to tie up for SSH access to a foreign Linux server


We are to have SSH access to client's Linux server for code installation and launch. As the client has given us FTP connection client has also said: "SSH access: Can you send me your SSH key. I will connect it to our Linux server."

Is this procedure correct, valid ?

Seems to me client should generate SSH key and forward to us for SSH access...


Solution

  • You should generate a public/private keypair (e.g. using ssh-keygen -r for an RSA-key). Share the public key with the customer (the name "public" indicates it is ok to share. The customer will add the public key to the server's authorized_keys file, so the owner of the corresponding private key (that is you) can login.

    What you are suggesting is wrong, as the client should not send you the private key of a key-pair. As the name indicates, private keys should never be shared.