How to fix: Port forwarding is disabled to avoid man-in-the-middle attacks.


Example command: ssh -v -R 12345:127.0.0.1:80 foo@localhost

Port forwarding is disabled to avoid man-in-the-middle attacks

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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 a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
SHA256:U/4Yahhp3R7IoEESd/Zpp1Vhn4+cRNp3eLyMHljudgw.
Please contact your system administrator.
Add correct host key in /home/Administrator/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /home/Administrator/.ssh/known_hosts:2
Password authentication is disabled to avoid man-in-the-middle attacks.
Keyboard-interactive authentication is disabled to avoid man-in-the-middle attacks.
Port forwarding is disabled to avoid man-in-the-middle attacks.

Solution:
edit file /home/Administrator/.ssh/known_hosts

localhost ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC+SoCXPG+WYfghmoTZ2XLOtyCOktnJAPUj/07/05VCp9pecClqd9DkBXmgDtFlYxcvd6lzI9QMwHS3hQWSxQcHv+HidSnVv2kHeDIN+UCHbJGv7r7WHrT/4qSRcJtyLgPJFMTU7R4yWLT70+NEMz1pgpIdWusC/Supa12slcq21pTnuFz5YmyVEqRaIIT5MZIayFd0JR7baZg0cIdmzjQlsdtexvZO+YjdcjWEpmBgLtej19c4k4kJaz/8mTggU2upX4l3tgqsd+VrO84dwFMy+Iid8v2vo1jKF7CfdynnLKTpNHx1Rz1dxa7Vkritvsj8WASy/nmaMCGXM2hGYCxd

delete old server key.
Done!

Leave a Reply