Changes between Version 4 and Version 5 of User Guide/Remote Access/Ssh Tunnel


Ignore:
Timestamp:
Aug 21, 2020, 12:03:27 AM (4 years ago)
Author:
msherman
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • User Guide/Remote Access/Ssh Tunnel

    v4 v5  
    88
    99[[CollapsibleStart(Linux & MacOS)]]
    10 ''NOTE: These instructions are NOT for Ubuntu running on Windows using Windows Subsystem for Linux (WSL).''
     10
     11Here, we define the following arguments:
     12* localuser: your username on your local machine
     13* localmachine: the computer that you're sitting at
     14* localport: a port on your local machine, accessed via localhost:localport
     15* testbeduser: your COSMOS username
     16* remotename: the resource you wish to connect to, for example, srv1-lg1.sb1.cosmos-lab.org
     17* consolename: the dns name of the COSMOS console you're using
     18
     19The following command will allow you to access remotename:remoteport by instead accessing localmachine:localport.
     20
     21This access is tunneled through the console, consolename.cosmos-lab.org, via a ssh session running under your user account, testbeduser.
     22
     23{{{ #!shell-session
     24localuser@localmachine:~$ ssh testbeduser@consolename.cosmos-lab.org \
     25-L localport:remotename:remoteport
     26}}}
     27
     28Here's an example, tunneling two ports to two different machines. The "-N" flag only forwards the ports, without opening a remote shell.
     29
     30{{{ #!shell-session
     31localuser@localmachine:~$ ssh testbeduser@sb1.cosmos-lab.org -N \
     32-L 9980:srv1-lg1:80 \
     33-L 9981:srv2-lg1:80
     34}}}
     35
     36
     37To make permanent:
    1138
    1239On Linux or Mac, via the terminal, make or edit a file at