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
[email protected]
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
[email protected]:/.../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.)