create a file ~.ssh/config on client

host host1
hostneme 200.201.202.203
port 200

host host2
hostname 200.201.202.203
port 201

then clean your ~.ssh/known hosts file

use ssh host1 to log on to 1st host
use ssh host2 to log on to 2nd host

these entries will make sure that ip_address - port association will be
stored in .known_hosts file

more info man ssh_config

martin.

On Sat, 2007-11-03 at 20:21 +0200, Peter Gordon wrote:
> ssh -V on Fedora 7
> OpenSSH_4.5p1, OpenSSL 0.9.8b 04 May 2006
> 
> 
> 
> I have ssh access to computers which sit on a NAT behind a router.
>         
>         These are the commands I use to access them:
>         
>         ssh -N -g -R 10000:127.0.0.1:200 [EMAIL PROTECTED]
>         ssh -N -g -R 10000:127.0.0.1:201 [EMAIL PROTECTED]
>         
>         The router routes port 200 to port 22 on computer 1 and
>                           port 201 to port 22 on computer 2.
>         
>         Starting with a clean known_hosts file, it ask for verification,
>         and
>         access proceeds.
>         
>         However, each time I access the other computer, ssh complains
>         about the
>         entry in the known_hosts file. 
>         
>         What is a decent workaround for this problem?
>         
>         Thanks,
>         
>         Peter
> 

Reply via email to