LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   ssh to multiple lan machines from the internet - How? (https://www.linuxquestions.org/questions/linux-newbie-8/ssh-to-multiple-lan-machines-from-the-internet-how-66864/)

v00d00101 06-20-2003 12:10 PM

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

david_ross 06-20-2003 12:20 PM

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.

v00d00101 06-20-2003 12:43 PM

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

manthram 06-20-2003 12:53 PM

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.

david_ross 06-20-2003 01:39 PM

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.