User Tools

Site Tools


biac:remotessh

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

biac:remotessh [2014/08/04 16:03]
biac:remotessh [2023/02/23 18:43] (current)
Line 1: Line 1:
 +===== How to use SSH to tunnel Remote Desktop from Windows PC via Nernst =====
 +These instructions explain how to use an SSH client and the Remote Desktop client that comes with Windows to access your BIAC desktop computer from a remote location.
 +=== Notes ===
 +  * If you are trying to do this from a Linux computer, see [[biac:rdesktop|Rdesktop]]. 
 +  * BIAC desktop computers are in the dhe.duke.edu subdomain, which means they are in the PHI zone, behind the Medical Center firewall. Therefore, a direct Remote Desktop connection will not work.
 +  * These instructions assume that you want to connect to your BIAC computer called __mycomputer__ (mycomputer.dhe.duke.edu) and that your BIAC Windows username is __myusername__.
 + 
 +
 +
 +
 +
 +==== Method 1 - Easy ====
 +If you don't have an SSH client yet, try the free Bitvise client, Tunnelier, 
 +which has one-click Remote Desktop tunneling:\\
 +http://www.bitvise.com/tunnelier
 +
 +  Login Tab
 +    Host: nernst.biac.duke.edu
 +    Port: 80
 +    Username: myusername
 +  Options Tab
 +    Open Terminal: unchecked
 +    Open Remote Desktop: checked
 +  Terminal Tab
 +    Computer: mycomputer.dhe.duke.edu
 +  
 +  Then you can save the profile.
 +
 +
 +
 +
 +==== Method 2 - Graphical ====
 +This is specifically for F-Secure's SSH Client, but should be easily generalized.
 +
 +If you don't yet have an SSH client, see [[biac:remotessh#Method 1 - Easy|Method 1]].
 +
 +  1) Start SSH Client.
 +  2) Select File > Profiles > Add Profile...
 +  3) Enter a name like "Remote to MyComputer" and click Add.
 +  4) Select Edit > Settings...
 +  5) Select Profile, and make sure "Include a separate set of Global settings in profile" is checked.
 +  6) If desired, click on "Create Shortcut" button.
 +  7) Select Connection, and enter the following:
 +     Host name: nernst.biac.duke.edu
 +     User name: myusername
 +     Port: 80
 +  8) Select Tunneling > Local, click on Add... and enter the following:
 +     [Note: some clients call this a client-to-server tunnel.]
 +     Display name: Remote Desktop
 +     Source Port: 3390
 +     Destination Host: mycomputer.dhe.duke.edu
 +     Destination Port: 3389
 +     Type: TCP
 +     Application to start: C:\WINDOWS\system32\mstsc.exe /v:localhost:3390
 +  9) Select Global Settings > Terminal, and make sure "Request Tunnels only" is checked.
 +  10) Click OK.
 +  11) Select File > Save Settings
 +  12) Press Enter key to start your connection.
 +  13) Enter your password when prompted to connect the SSH tunnel.
 +  14) The Remote Desktop client should start automatically. Enter your username and password as usual.
 +  15) If you saved a desktop shortcut in step 6, you can launch your connection using that icon in the future.
 +
 +
 +
 +
 +
 +
 +==== Method 3 - Command Line ====
 +This is specifically for F-Secure's SSH Client, but should be easily generalized. It assumes the F-Secure directory is in your path.
 +
 +  1) Run the following command:
 +       ssh2 -S -L 3390:mycomputer.dhe.duke.edu:3389 -p 80 myusername@nernst.biac.duke.edu
 +     [Note: some clients use -N instead of -S for no terminal session.]
 +  2) Enter your password when prompted to connect the SSH tunnel.
 +  3) Run the following command from a different command window or using Start Menu > Run...:
 +       mstsc /v:localhost:3390
 +  4) When you are done, logoff your Remote Desktop connection
 +  5) Press Ctrl-C to end your ssh2 tunnel from step 1.
 + 
 +
 +
 +==== General Tips on Remote Desktop Connections ====
 +  * To run MATLAB, you will need to run this batch file: [[\\Munin\Data\Programs\Fix\RMATLAB.bat]]
 +  * You may remotely connect to your computer even if you are already logged in.  In this case, you will be connected to your active session and can use all the applications that you had open.
 +  * Only one user may be logged into the computer at a time.  If //someone else// is logged into your computer and you try connect to it remotely, you will be unable to connect.
 +  * If you logoff a remote session, you are logged off the computer just as if you had logged off locally.
 +  * You may disconnect from a remote session, and it will remain logged on and running (with its screen locked).  To disconnect, simply close the Remote Desktop Client instead of logging off of the remote computer.
 +  * Video and other graphics-intensive applications will be slower than if using the machine locally.