Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

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/ 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 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.