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
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 ?


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
ssh HostB

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


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 ...
  • Re: Cost of setting up a network
    ... A router capable of acting as a VPN endpoint for more than one user simultaneously with four Ethernet ports or a switch to suit. ... The rationale for using a server here is basically that the router doesn't need to be able to decide which PC to route the connection to. ... If you are using a router which supports it, you can set up a port-forwarding inbound rule which also _translates_ the port supplied to the receiving port. ... You can use several of these connections to different machines simultaneously. ...
  • 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 ...
  • 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 ...
  • 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 ...