Ssh tunnel (Trent's way)

Revision as of 15:31, 16 April 2018 by TBalius (Talk | contribs)

Jump to: navigation, search

(1) Open two terminals. In the first terminal write one of the following lines:

ssh -CL -p 22 -i  ~/.ssh/toucsfportal

The above line creates a localhost that points to gimel. It will login to portal.

This assumes that you have already created the a key pair. The public key has been put onto portal. If you have multiple keys, use the -i flag to specify the private key location.

ssh -CL -p 22 -i  ~/.ssh/toucsfportal

The above line, creates a localhost that points to sgehead. It will also connect through portal.

ssh -CL -p 22 -i  ~/.ssh/toucsfportal -v

This line, will create a localhost that points to gimel and will connect through epsilon (a different name for portal).

(2) In the second terminal, you can connect to gimel (or sgehead) with the following.

ssh -p 2222 tbalius@localhost

(3) in the second terminal issue the following command:

scp -P 2222 tbalius@localhost:temp.txt .

this command will copy the file from sgehead to the local machine.