1

I have a problem on my Ubuntu server. When I try to ssh from that server to a second server, I get this error:

federico@federico:~/.ssh$ ssh root@federicolivieri.noip.me -vvv
OpenSSH_7.2p2 Ubuntu-4ubuntu1, OpenSSL 1.0.2g-fips  1 Mar 2016
debug1: Reading configuration data /home/federico/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: resolving "federicolivieri.noip.me" port 22
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to federicolivieri.noip.me [95.144.54.179] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /home/federico/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/federico/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/federico/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/federico/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/federico/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/federico/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/federico/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/federico/.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-4ubuntu1
debug1: ssh_exchange_identification: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">

debug1: ssh_exchange_identification: <html><head>

debug1: ssh_exchange_identification: <title>400 Bad Request</title>

debug1: ssh_exchange_identification: </head><body>

debug1: ssh_exchange_identification: <h1>Bad Request</h1>

debug1: ssh_exchange_identification: <p>Your browser sent a request that this server could not understand.<br />

debug1: ssh_exchange_identification: </p>

debug1: ssh_exchange_identification: <hr>

debug1: ssh_exchange_identification: <address>Apache/2.4.10 (Raspbian) Server at 127.0.1.1 Port 80</address>

debug1: ssh_exchange_identification: </body></html>

ssh_exchange_identification: Connection closed by remote host

However I can see the id_rsa under /home/federico/.ssh/

federico@federico:~/.ssh$ ls -l
total 76
-rw-r--r-- 1 federico federico  1265 Jun 29 14:10 config
-rw-r--r-- 1 federico federico  3261 Jun 22 09:59 id_rsa
-rw-r--r-- 1 federico federico   727 Jun 22 09:59 id_rsa.pub
-rw-r--r-- 1 federico federico 11906 Jul 19 09:28 known_hosts.bak
-rw-r--r-- 1 federico federico  9682 Jun 30 09:04 known_hosts.old

I research for that error but everyone suggest something different and those solutions didn't work for me. Any idea?

Thanks

  • 2
    it seems Apache is answering to port 22/TCP (the SSH port) – Rui F Ribeiro Jul 19 '16 at 9:38
  • <title>400 Bad Request</title> This does not look like a SSH server. – Jakuje Jul 19 '16 at 14:01
0

-rw-r--r-- 1 federico federico 3261 Jun 22 09:59 id_rsa

You have to have your key read protected.

chmod 600 .ssh/id_rsa

  • I don't think that's going to help this problem, when Apache appears to be listening on port 22... – Jeff Schaller Jul 12 '18 at 16:39
  • debug1: key_load_public: No such file or directory debug1: identity file /home/federico/.ssh/id_rsa type -1 Have you tried to nmap host? – towelenee Jul 13 '18 at 17:30

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.