LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   How to get in a different network (https://www.linuxquestions.org/questions/linux-networking-3/how-to-get-in-a-different-network-4175463026/)

georgewhr 05-22-2013 11:28 AM

How to get in a different network
 
Hello Guys, here is the problem. I have 3 host machines, h1,h2,h3. h2 has two ethernet cards connect to h1 and h3 seperately, so that means h1 and h2 are in a LAN, h2 and h3 are in a LAN.

Is there a way that I can run some commands and transfer some files directly from h1 to h3 and skip h2? Here is the thing, we can't do anything in h2 and we can't set up a LAN between h1 and h3

some people said I can use sshlib to create a ssh session, but I m not sure how it's gonna work

thanks!

the good thing is we know the passwod for all of the root

lleb 05-22-2013 01:31 PM

i take it h2 does not allow h1 and h3 to see each other. if this is for security reasons, then id encourage you NOT to pass files between h1 and h3.

if this is just a thing that has nothing to do with security, OSHA, HIPA, etc... then setup ssh between h1 and h3 and you are done. are any of them accessible from the WAN?

i suppose the worst case is to setup a reverse ssh connection using h2 as a go between.

make a connection from h2 into either h1 or h3 but set it to a higher port (1025+), and set up the forwarding.

http://www.howtoforge.com/reverse-ssh-tunneling

something along that line, you might need to do a bit more google searching, but it can be done.

what happens at this point is h2 is nothing but a passthrough. none of the information sent from h1 to h3 will be stored on h2.

georgewhr 05-22-2013 06:01 PM

Thank you bro, I ll try to use reverse SSH to see if it works

Quote:

Originally Posted by lleb (Post 4956708)
i take it h2 does not allow h1 and h3 to see each other. if this is for security reasons, then id encourage you NOT to pass files between h1 and h3.

if this is just a thing that has nothing to do with security, OSHA, HIPA, etc... then setup ssh between h1 and h3 and you are done. are any of them accessible from the WAN?

i suppose the worst case is to setup a reverse ssh connection using h2 as a go between.

make a connection from h2 into either h1 or h3 but set it to a higher port (1025+), and set up the forwarding.

http://www.howtoforge.com/reverse-ssh-tunneling

something along that line, you might need to do a bit more google searching, but it can be done.

what happens at this point is h2 is nothing but a passthrough. none of the information sent from h1 to h3 will be stored on h2.


bloodstreetboy 05-27-2013 01:19 AM

Yes it will work definitely.

Even you can use scp command to copying files between the systems.

eklavya 05-27-2013 08:08 AM

If you want to copy the files between system, you can use rsync too.


All times are GMT -5. The time now is 06:04 PM.