|
SSH-SCP /
ForwardingForwarding is the act of setting up a connection between your local computer and a remote computer by going through a server. This is often done to circumvent network limitations (ex.: Firewalls not allowing direct remote connections, but enabling connections to a server, which means you can reach the remote computer through the server). Local forwardingLocal forwarding is setting up a way for a remote server to forward a request from the local computer onto the remote network. Setting up the forwarding is done through:
where To then access the remote computer, one can use SSH:
to ssh to the remote computer. This is equivalent to using ssh to access the server, then using ssh again to access the remote computer from the server. The main interest is using SCP to transfer files directly from the remote computer to the local computer, without having to go through the server except for the forwarding, using:
To copy all the files in a folder:
Accessing remote computers with one commandFor remote computers that you want to access often (ex.: a desktop at work), the information can be stored in your .ssh/config file to make things easier: Host server
User serverUsername
Hostname serverAddress
Host remoteComputer
User computerUsername
Hostname remoteComputerAddress
# Port 2222
ProxyCommand ssh -q -W %h:%p server
with this done, you can now use |