I am using rackspace cloud hosting. I have 2 servers behind a load balancer. Each server has an external IP and an internal IP. I want to setup a sync job that uses SSH to transfer files. I made an rsa key, and I can successfully SSH from server A into server B, using the external IP of server B, without being prompted for a password. If I try to do the same but use the internal IP, it prompts me for a password. I want to be able to use the key instead of the password. Why is this? Is there something special I have to do during key generation so it works for both IPs?
Any help is appreciated.
ssh -i ~/.ssh/id_rsa $IP
authorized_keys
are located on the server, you need to specify the private key you are using on the client. You can also create aconfig
file in your.ssh
folder. Checkman ssh_config
for syntax.