-2

I use an free ssh-chat application for me and a friend. Formerly, he can connect to my chat (via ssh) without any problem.

But I changed the user session in my Linux and I had to generate a new ssh key with the command :

ssh-keygen -t rsa -b 4096 -C "myemail@example.com"

I started the ssh chat from my new user session. That works perfectly. (I can connect to the chat via another local computer)

But when my friend try connect to the chat, he get the following warning :

enter image description here

And "sometimes", the shell ask him to enter password (friend said me that) So, I ask him to clear the file known_hosts showed in his warning message via :

ssh-keygen -R myip
ssh-keygen -R -F myip
sudo ssh-keygen -R myip
sudo ssh-keygen -R - F myip
#we try severals commands

Now the file known_hosts is empty, but the friend get always the warning when he try connect to my chat via ssh.

I don't understand why he gets this warning while the known_host (with the path showed in the warning message) is empty ? (computer restarted)

And why sometimes, the shell ask him to enter password ? (sorry, I have no more details...). From my initial user session, password never asked when my friend connected to the ssh application

spacecodeur
  • 2,206
  • 7
  • 35
  • 71
  • Do not paste text in pictures. The file can not be empty. Show us the file (`cat ~/.ssh/known_hosts`). – Jakuje Sep 02 '16 at 18:17
  • 1
    Possible duplicate of [ssh remote host identification has changed](http://stackoverflow.com/questions/20840012/ssh-remote-host-identification-has-changed) – Rich Feb 24 '17 at 17:09

1 Answers1

0

We forget add the port number when we remove host via ssh-kegen.

So, my friend execute :

ssh-kegen -R [xxx.xxx.xxx.xxx]:yyyy
# xxx.xxx.xxx.xxx the ip of the server where is the ssh chat
# yyyy, le port number used by the application

And that works :) He can connect to the chat withou any issue

spacecodeur
  • 2,206
  • 7
  • 35
  • 71