2
hadoopmaster@dhruvhadoop1-HP-Compaq-dc5800-Small-Form-Factor:~/.ssh$ ssh-copy-id -i ~/.ssh/id_rsa.pub slave-1

/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 slave-1 port 22: Connection refused
2

I'd generally take "connection refused" to mean that the target server isn't listening on port 22.

What's the output of netstat -an|grep 22 when run on slave-1?

You should get something like:

$ netstat -an|grep 22
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN

Probably you need to install/start the ssh server on slave-1

| improve this answer | |
1

I have the same problem. sometime the error is simple, ssh is not installed. the openssh-client should be installed on your local machine, and openssh-server should be installed on the remote computer. However, you can install both openssh-client and openssh-server on both machines.

Use this :

sudo apt-get update
sudo apt-get install openssh-server openssh-client

Visit https://ubuntuforums.org/showthread.php?t=1702992

| improve this answer | |

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.