ssh to multiple lan machines from the internet - How?
I have a question regarding using ssh to access a machine on a personal network from a remote location?
Is it required to use different incoming ports for each machine on the lan eg 10.0.0.1:400 10.0.0.2:401 and if so, what files would i need to change. If their is a simpler method/approach, could you point me to the answer. Thx |
Ports sounds like the way to do it.
I assume you are using a singe machine with a single ip address as a gateway. You will need to add either iptables or ipchains rules to that machine that point to the internal one(s) you want to access. |
I am using a router for dhcp etc, plugged into it are 3 switches and a whole load of machines. SSH from the lan side is easy, but i want to be able to go on holiday and still do remote admin, from net cafes abroad :)
Thx anyways |
do you have a linux firewall before the router? if you have a linux firewall then you can use the iptables or ipchains rules (as david pointed out ) to forward all the traffic to a specified port to a internal machine. you can then run the ssh server on the internal machine on the specified port. if you dont have a linux firewall then you need to confiure port forwarding on the router.
you need to setup the individual ssh servers on the internal machines to listen on different ports. |
Either that or just forward to one box and then ssh from there to the others - the choice is yours.
|
All times are GMT -5. The time now is 08:30 AM. |