Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using the following config to connect to multihop to the target host (gw2 and target have my public key stored in the authorized_keys file ; no netcat on all systems):

Host gw1
 User john

Host gw2
 User jack
 ProxyCommand ssh gw1 'exec 3<>/dev/tcp/; cat <&3 & cat >&3;kill $!'

Host target
 User jill
 ProxyCommand ssh 'exec 3<>/dev/tcp/; cat <&3 & cat >&3;kill $!'

I cleaned my known_hosts file and connected to gw2 using ssh gw2 from the local machine. The fingerprint is different from the one I expect. The same happens when I ssh into target using ssh target from the local machine, the rsa fingerprint is different.

When I ssh into gw1 and then into gw2 (from gw1) ssh-keygen -lf /etc/ssh/ssh_host_rsa_key.pub produces the fingerprint I expect.

I'm (fairly) certain that there is no MITM going on. Can anybody explain to me this behaviour? Should I be worried?

share|improve this question

migrated from stackoverflow.com Feb 23 '12 at 17:11

This question came from our site for professional and enthusiast programmers.

So if anyone stumbles upon the same problem. The eror was to only check for keys in /etc/ssh/ whereas the active installation was in /etc/ssh58/ – oschrenk Feb 23 '12 at 16:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.