I'm setting up another pc on my network. it will eventually be headless.

It currently boots into the centos CLI ~ which is fine. now i want to copy over my ssh rsa key from my main debian pc to the new centos one.

I can ssh from debian to centos with 'normal password'

ssh-copy-id [userName]@

the terminal will then ask for the password, and everything is fine, however when I attempt to copy my public key to the server using

ssh-copy-id -i id_rsa.pub [userName]@

the call will eventually time out... here is the output

/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

I now that using a standard ssh login I can get the debug info, but how do I debug the ssy-copy-id command, i've tried

ssh-copy-id -i id_rsa.pub -o -v [userName]@ ssh-copy-id -i id_rsa.pub -v [userName]@

but I just get errors for invalid options, so I have no way to debug what isn't working.

I've done a similar thing with other virtual machines (also running debian) and they have copied over the rsa key almost instantly, what config option have I got that is different between debian and Centos that is causing me grief ?

All help would be much appreciated.

thanks in advance


p.s. I've copied this question to here from my StackExchange question because I put it on the wrong site !

  • you do not use $192 ? this would evaluate to 192 th argument of calling shell. beside, there is a [userName](leading [ ) and userName] (no leading [ ) – Archemar Apr 15 '16 at 7:37

The IP of your target machine is, while the error says not reachable.

that's probably because there's a $ sign after @, in front of the IP address in your command?

  • That is just so dopey ! Insane how some things can't be seen for looking. – DaveM Apr 15 '16 at 8:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.