LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   remote file access (non-networked machines) (https://www.linuxquestions.org/questions/linux-newbie-8/remote-file-access-non-networked-machines-141963/)

mikescar 02-03-2004 05:25 PM

remote file access (non-networked machines)
 
hello,

i'm using SSH to log into one machine. i also have ssh access on a second machine that stores some important files. both machines are a few hours away.

what i would like to do is SSH into the first machine, and then from there, get files from my account on the second machine.

is this possible? or, how?

many thanks in advance,
mike

jtshaw 02-03-2004 05:30 PM

Ok, I think this is what your situation is. You have three machines: A, B, and C. You are at machine C. Machine C can connect to B but not to A. Machine B can connect to A or C.

If this is the case, what you need to do is setup SSH forwarding. The man page on ssh will tell you how to do this specifically, but the idea is you setup ssh to listen on a random port on machine B. When you connect to that port it'll actually connect you through to machine A.

mikescar 02-03-2004 05:46 PM

remote access
 
ok, i will clarify using the A / B / C's

i am at machine C. machine C can connect to either A or B using SSH.

i ssh into machine A to set up some scripts there. i can SSH from A to B (and from B to A).

i would like to copy some files located on Box B over to Box A. i could do this from either B or A.


i'm sure it's pretty easy but i am still new.


thanks a lot,
mike

jtshaw 02-03-2004 06:01 PM

AHHH, I see. Forget ssh tunneling then. SSH into either machine A, or machine B. Then you scp to copy the files.

For instance, if you are logged into machine A and you are copying files from A to B you would do something like this

scp -r directorytocopy username@machineB.net:locationtocopyto


All times are GMT -5. The time now is 07:29 AM.