LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   ssh port forward failure (https://www.linuxquestions.org/questions/linux-networking-3/ssh-port-forward-failure-152244/)

harmster 03-01-2004 11:59 AM

ssh port forward failure
 
Hello all,

I have configured our iptables to forward a request to port 2223 on our server to my pc port nr 22. And that actually works if I have an empty know_hosts file on the remote machine I want to use to login to my machine. Something like: $ ssh -p2223 foo@bar.com
On connection ssh ask whether or not I would like to add a key to my empty known_hosts file. I agree and merrily go my way. But if I disconnect and try to ssh to our server like: $ ssh foo@bar.com it complains about "WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!" and "Host key verification failed". Real nice, now I have to clean out my known_hosts file again.
There must be an easier way! Can't I configure the remote system so that I will be able to connect to _both_ port 22 and 2223 without deleting the entry out of my known_hosts file?
Any help is appreciated.

peter_robb 03-01-2004 12:41 PM

Either turn off strict checking in ssh_config
or use an ip number for the non standard ports connections..

harmster 03-08-2004 06:46 AM

I tried both but both with the same result. None. :(


All times are GMT -5. The time now is 07:56 PM.