Re: Connecting to 2 machines with the same IP



mpg schrieb:
Hi all,

At home, I've got 2 machine on my LAN, connected to the Net through a
routeur, thus sharing the same IP address. I'm using NAT port forwarding,
such that the router redirects port 22 from its public interface to port 22
of machine A, and port 10022 to port 22 of B :

22 -> 22
Net ----- NATbox +--- A
+----B
10022 -> 22

I often need to connect form the Net to both machine A and B. Unfortunately,
I allways have a warning, since there are 2 machine with the same IP, that
the certificate asociated to this IP has changed.

Is there any way to have two certificates associated with the same IP in
~/.ssh/know_hosts ?

Manuel.


Have you tried to put

Host HostA
HostName Name.of.Router # or IP of Router
Port 22
HostKeyAlias HostA

Host HostB
HostName Name.of.Router # or IP of Router
Port 10022
HostKeyAlias HostB

into your .ssh/config and then simply

ssh HostA
or
ssh HostB

to connect?
You could read man ssh_config to understand this.

Wolfgang
.



Relevant Pages

  • Re: Using Remote Desktop From an SBS Domain
    ... when you tried to RDP while attached directly to a port on your router? ... So if 3389 needs forwarded on the client end too then that is what the ... Hopefully next week I can attempt a connection while my ISP watches the ...
    (microsoft.public.windows.server.sbs)
  • How did they get behind my NAT?
    ... this point I panicked and shutdown the VNC service ASAP. ... My question is how the attacker got to my VNC port! ... the internet through the router. ... client connection using local port number 5900 (which was also being ...
    (alt.computer.security)
  • Re: Connecting to Home Computer
    ... cannot transmit IP packets outside the local network). ... assigned by your router. ... You have to add the port too, ... Determine the ports (pcAnywhere uses 5631 for DATA, 5632 for STATUS, I ...
    (microsoft.public.windowsxp.work_remotely)
  • RE: [Full-Disclosure] Microsoft urging users to buy Harware Firewalls
    ... connections between multiple computers. ... A Linksys NAT router box is selling for only $40 at Amazon ... Besides protecting against the MSBlaster worm, a hardware ... Then the user finds about port forwarding, and as soon as the user ...
    (Full-Disclosure)
  • Re: Routers Firewall
    ... > AFAIK most firewall fitted routers do not allow incoming connections by ... > to connect to a port your public IP address the router would reject the ... > router you may be vulnerable. ... > An open port on the router could be connected to a service running on the ...
    (comp.security.firewalls)