I'm using the following config to connect to multihop to the target host (
target have my public key stored in the
authorized_keys file ; no
netcat on all systems):
Host gw1 HostName 255.255.255.1 User john Host gw2 HostName 255.255.255.2 User jack ProxyCommand ssh gw1 'exec 3<>/dev/tcp/255.255.255.2/22; cat <&3 & cat >&3;kill $!' Host target HostName 255.255.255.3 User jill ProxyCommand ssh 255.255.255.2 'exec 3<>/dev/tcp/255.255.255.3/22; cat <&3 & cat >&3;kill $!'
I cleaned my
known_hosts file and connected to
ssh gw2 from the local machine. The fingerprint is different from the one I expect. The same happens when I ssh into
ssh target from the local machine, the rsa fingerprint is different.
When I ssh into
gw1 and then into
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?