Rsync RSA keys for two different users
Hello.
I am trying to set up an Rsync transfer to a remote server. I had already created my RSA-pub authorization keys, and am now ready to transfer an rsa key into the remote server. here is the problem: The remote server is shared by many users. I cd into the ~.ssh file and found that another rsa-pub key already exists from another user. what will happen if I transfer my rsa-pub key into the .ssh file when there exists already another? Thank you very much |
You don't put your authorization key file itself into ~/.ssh, you tack the line contained in your key file into the ~/.ssh/authorized_keys file on the destination machine. There can be as many as you want in that file.
The key file you're seeing in ~/.ssh on that machine is for a user who is already logged into that machine and is trying to ssh elsewhere. In other words, that's that machine's outgoing key, the authorized incoming keys are stored in ~/.ssh/authorized_keys or authorized_keys2. |
rsa_pub
So I was following the directions from
http://wiki.linuxquestions.org/wiki/...reate_ssh_keys and when I copied over the rsa_pub (under the directions 5th copy) I overwrote an rsa_pub file that existed there previously. Is this problematic? How do I fix this issue? Thank you |
Somebody else would have to answer that. I bet you can re-generate the public key from the private key with some openssl command, but I don't know what it is.
In the future, don't follow those instructions. Just open two terminal windows. In one open up your public key in a text editor, in the other you should ssh to the destination machine and open up the ~/.ssh/authorized_keys or authorized_keys2 file in a text editor, then just copy and paste your public key over. You can do it in one command with: Code:
cat ~/.ssh/id_dsa.pub | ssh -l <user> <remoteserver> "cat - >>.ssh/authorized_keys2" |
Quote:
do NOT overwrite the rsa_pub on the remote server you are setting up the keys. from the local server do the following: Code:
$ scp id_rsa.pub remote_server_user@remote_IP:/home/remote_server_user/.ssh/id_rsa.pub.foo Code:
$ ssh remote_server_user@remote_IP P.S. I also added these instructions to that wiki link so others can be helped and hopefully avoid the pitfall you have been facing. |
All times are GMT -5. The time now is 03:05 AM. |