Re: dealing with different ssh ports on one host



Dans l'article <76rr1pF1docs9U1@xxxxxxxxxxxxxxxxx>,
Markus Veltre <mveltre82@xxxxxxxxxxx> écrit:

] To connect to the second host, I need to delete <home>/.ssh/known_hosts
] or at least delete the host's key line.
]
] Is there any why to tell ssh it should consider the port I'm connecting
] to?

I don't think so, but you can work around your problem by using the
"UserKnownHostsFile" option on one of the "ssh" commands:

ssh -p 22 user@xxxxxxxxxx
ssh -p 2222 -o UserKnownHostsFile=~/.ssh/otherKNF user@xxxxxxxxxx

--
| ~~~~~~~~ Martin Ouwehand ~ Swiss Federal Institute of Technology ~ Lausanne
__|___________ Email/PGP: http://personnes.epfl.ch/martin.ouwehand ____________
Six months in the lab will save you an afternoon in the library [Uncle Al]
.



Relevant Pages

  • Re: SSH Connects for me only sporadically.
    ... Now the server is behind a wireless router, ... port has a non standard external port number. ... ssh, and I get the same results. ... Connecting with ssh on the local lan at home works fine every time. ...
    (comp.security.ssh)
  • Re: ssh "worms or "bots"
    ... Wouldn't suggest connecting ... I need to have ssh open for a few ... >> users ips, but I'd rather not, as thier ips are not all static. ... > non-standard port. ...
    (comp.os.linux.security)
  • SSH Connects for me only sporadically.
    ... Now the server is behind a wireless router, ... port has a non standard external port number. ... ssh, and I get the same results. ... Connecting with ssh on the local lan at home works fine every time. ...
    (comp.security.ssh)
  • SSH Connects for me only sporadically.
    ... Now the server is behind a wireless router, ... port has a non standard external port number. ... ssh, and I get the same results. ... Connecting with ssh on the local lan at home works fine every time. ...
    (comp.os.linux.networking)
  • Re: Port forwarding through SOCKS server (SSH tunneling)
    ... >>> However what I cannot do is connecting through the SSH tunnel, ... I can see the port is open as I can telnet ... >To my knowledge VNC only uses 1 TCP port (unless you wish to use the Java ...
    (comp.security.ssh)