Question

How to ssh from one droplet to another

Posted July 12, 2017 1.8k views
Linux Commands Ubuntu 16.04

I’ve got 2 droplets and I have an idea to move files from a to b using rsync then return from b to a using the same.
I need to use ssh in the rsync and getting a permission denied error. I also tried adding the ssh key but found you can’t add an ssh key to an existing droplet.

my ssh key works fine from my local machine I’d need it to work also from the droplet.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

1 answer

Are you sure the key on droplet a is authorized on dropblet b and vice-versa?

the key in ~/.ssh/idrsa.pub on droplet a should appear as a line in ~/.ssh/authorizedkeys on droplet b

Then, from droplet a, you should be able to type “ssh username@dropletb” and log in.

Submit an Answer