2
For me, networks are a very "opaque" thing, and even with reading a lot of tutorial about SSH, I do not understand how to create a basic tunnel to transfer my files.
The configuration is the following :
My Computer --[Internet]--> Bridge Machine --[Local Network]--> Final Machine
Currently I do the following :
1) Connect to the Bridge Machine with :
ssh -X username@bridgemachine.something.fr
2) Connect to the Final Machine with :
ssh -X username@finalmachine
3) I copy the address of files I need (for example .../mydirectory)
4) Then I deconnect from the finalmachine with :
exit
5) I copy the files to the bridge :
scp -r username@finalmachine:/.../mydirectory .
6) I deconnect from the bridge with :
exit
7) I copy the files to my machine :
scp -r username@bridgemachine.something.fr:/.../mydirectory .
Which is quite complicated. My question is basic : how to simplify this using a SSH tunnel ?
(and please explain me the signification of each command line you write, to understand what each line really do and to avoid to use it like a magical thing. Furthermore if some ports number are used, explain me if I can pick a completely random number or if I have to choose a specific one.)
1
Google on "ssh tunnel tuorial" gives http://www.popcornfarmer.com/2009/01/ssh-tunneling-tutorial/ & http://www.revsys.com/writings/quicktips/ssh-tunnel.html & http://aperiodic.net/phil/ssh/ and many others references
– Basile Starynkevitch – 2012-11-11T07:17:44.127You could also just run your local ssh to run scp on the bridge machine (give it the scp command to run), then run scp on the local machine, then wrap that all in a shell script. You could easily make one command out of it that way. – Keith – 2012-11-11T14:59:58.173