0

I can connect to a remote server using with one PC, but not with another, where I get

debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: resolving "*******" port 22
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to ***** [****] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: SELinux support disabled
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.1
ssh_exchange_identification: Connection closed by remote host

I have to say that this is a new problem, a few days ago I was able to connect, what could cause this behavior? Why only one PC cannot connect? I always use the same login. Also, I don't know why it looks for identity files in /root/.ssh, since I am running the command from a normal user

thanks

0

It looks like you don't have the right public-key-file. Try to copy them from the working computer to the nonworkinig. They should be somewhere in your home directory. Normally id_rsa.pub.

It also could be solved if you check your known_hosts file and remove the not working one and reconnect your host by:
ssh-copy-id -i ~/.ssh/id_rsa.pub user@remote-system
To find out which one in the known_hosts file is your nonworking one compare the key from the id_rsa.pub and the entry in the known_hosts file.

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.