Can't copy ssh from Ubuntu server to Rpi

I have a digitalocean server that i want to use to orchestrate a couple of RPies with Ansible. I have created the key pair and i’m trying to ssh-copy-id pi@#####… but all i get is this:

/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed

/usr/bin/ssh-copy-id: ERROR: ssh: connect to host ###.###.###.### port 22: Connection timed out

At first I thought it was a firewall issue, but when i connect the Rpies directly with ethernet cables through a switch and try again I still get the same output in the terminal…

It might be an issue with already generated or stored keys on the RPies?

Anybody who know what could be the obstacle?

All help would be much appreciated


Use the dry-run option to see if it would have added the key

ssh-copy-id -n yourdomain

Type yes or y after machine fingerprint displayed. If you don’t get that far and instead get a connection timed out, then it could be a configuration issue in your Pis /etc/ssh/sshd_config file or the PAM configuration (if you enabled PAM).

No worries, solved the problem:)

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

This question was answered by @hoyerjorgen:

No worries, solved the problem:)

View the original comment