-2

I can't connect to my server with ssh. I have already started a session with ssh but i know if i quit this session, i won't be able to connect again to my server.

ssh [email protected]

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
07:fe:8f:12:83:09:ce:87:ec:60:9d:75:b4:d2:04:12.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /root/.ssh/known_hosts:3
Password authentication is disabled to avoid man-in-the-middle attacks.
Keyboard-interactive authentication is disabled to avoid man-in-the-middle attacks.
Permission denied (publickey,password).

ssh -o StrictHostKeyChecking=no [email protected]
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
07:fe:8f:12:83:09:ce:87:ec:60:9d:75:b4:d2:04:12.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /root/.ssh/known_hosts:3
Password authentication is disabled to avoid man-in-the-middle attacks.
Keyboard-interactive authentication is disabled to avoid man-in-the-middle attacks.
Permission denied (publickey,password).

I try :

rm /root/.ssh/known_hosts
rm: cannot remove `/root/.ssh/known_hosts': No such file or directory

ssh-keygen -R genese.com
ssh-keygen: /root/.ssh/known_hosts: No such file or directory

1 Answer 1

5

The known_hosts file resides on the client.

Are you sure you know what you are doing?

4
  • The offending host key is located on the client. The host key is used to make sure you talk to the server you are supposed to talk to. You probably reinstalled your server, right? Well, you still have the old host key on the client. You have to correct the known_hosts file on the client, meaning delete the offending line, if really you believe it has changed on the server (otherwise you have a problem).
    – Marki
    Jan 26, 2014 at 11:49
  • Yes i reinstalled my server, but i really don't understand what do you mean by : "on the client". As you can see, the file known_hosts doesn't exist.
    – mpgn
    Jan 26, 2014 at 11:51
  • 2
    It doesn't exist on the server. It certainly exists on the client you are trying to connect from ("Offending ECDSA key in /root/.ssh/known_hosts:3")
    – Marki
    Jan 26, 2014 at 12:02
  • so simple ! thx, i'm really retarded, thx for the explanation and your time.
    – mpgn
    Jan 26, 2014 at 12:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .