Jump to content

ssh connection problem [solved]


dude67
 Share

Recommended Posts

Hi folks, here's another problem I'm having with ssh.

 

I'm trying to connect to another PC here at home within my LAN IP space. PC #1 is this (192.168.254.5) and PC#2 is the one I'm trying to connect to (192.168.254.1).

 

When I write "fish://192.168.254.1" in Konqueror it returns this:

Could not connect to host 192.168.254.1

When I write "sftp://192.168.254.1" in Konqueror it returns this:

An error occurred while loading sftp://192.168.254.1:
			   WARNING: The identity of the remote host '192.168.254.1' has changed!
			   Someone could be eavesdropping on your connection, or the administrator may have just changed the host's key. Either way, you should verify the host's key fingerprint with the host's administrator. The key fingerprint is:
				a8:e7:71:c7:26:49:34:a8:10:a2:cf:13:3c:54:a5:2b
				Add the correct host key to "/home/dude67/.ssh/known_hosts" to get rid of this message.

When I write "ssh://192.168.254.1" in Konqueror it returns this in Konsole:

		 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
			   @	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 the RSA host key has just been changed.
			   The fingerprint for the RSA key sent by the remote host is
			   a8:e7:71:c7:26:49:34:a8:10:a2:cf:13:3c:54:a5:2b.
			   Please contact your system administrator.
			   Add correct host key in /home/dude67/.ssh/known_hosts to get rid of this message.
			   Offending key in /home/dude67/.ssh/known_hosts:5
			   Password authentication is disabled to avoid man-in-the-middle attacks.
			   Keyboard-interactive authentication is disabled to avoid man-in-the-middle attacks.
			   X11 forwarding is disabled to avoid man-in-the-middle attacks.
			   Permission denied (publickey,password,keyboard-interactive).

 

OK, I'm guessing something has changed somewhere - unless someone has gained access to my system. What does "identification has changed" mean?

 

A few more details.

- service sshd is running in both machines

- At first I didn't have Firestarter running, but I've turned Firestarter on but no change in the result (configuring to let the traffic pass from each machine to the other)

- I'm running MDV 2008.0 Free on both PCs with Gnome and they are up-to-date (updated today)

- It has been working before - just now cannot remember if I've done so while running MDV2008.0.

- I updated both systems from 2007.1 by (in the end) installing it anew, but leaving /home partition untouched

- There seems to be an RSA key logged for both PCs in their /home/dude67/.ssh/known_hosts file

- I CAN connect from this PC to the ftp of the other PC (from 192.168.254.5 connect with ftp to 192.168.254.1:2021). The other PC is connected to a PVR with a USB and that connection is made to be a FTP with a piece of software called ftpd-Topfield (the brand of the PVR).

 

Does anyone have any clue what's going on?

Link to comment
Share on other sites

This can happen if you have changed network card (and probably other cases as well), well, I don't know all the details but, the snippet below is the important part:

 

						Offending key in /home/dude67/.ssh/known_hosts:5

The easiest thing to do is to remove line 5 in your .ssh/known_hosts, and all will be solved.

Link to comment
Share on other sites

Normally when you connect to another computer through ssh for the first time the key for this computer will be stored in ~/.ssh/known_hosts, now if you did an upgrade this computer will provide another key that does not mach your stored key, maybe you could try to delete the offending key from known_hosts and then try connecting again.

 

this should be the same with sftp (it is part of ssh and uses the same keys)

 

you can create your own keys with ssh-keygen

Link to comment
Share on other sites

Thanks guys, that seems to have solved it!

 

I simply had a look at this PC#1's list of known_hosts and commented out the key of the one I was trying to connect to. And that's it! I guess the key was outdated and it issued a new key. I vaguely remember doing something like that before...

 

:thumbs:

Link to comment
Share on other sites

yep that was your problem, the keys just did not match.

 

as I already mentioned with ssh-keygen you can create your own key-pairs, which might make administration easier (you don't have to bother with mismatching keys after an upgrade)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...