Difference between revisions of "SSH/SFTP"

From radwiki
Jump to navigation Jump to search
Line 6: Line 6:
  
 
In addition, remote desktop solutions such as VNC or X forwarding typically depend on shell (SSH tunnel) access.  
 
In addition, remote desktop solutions such as VNC or X forwarding typically depend on shell (SSH tunnel) access.  
{Note| X forwarding sends a single application window, typically without compression or network optimization. VNC sends the entire desktop and is optimized for networked usage, such as persisting after an accidental disconnect. The former uses the default port range 6000+N, the latter 5900+N.}
 
  
 
To connect with SSH or SFTP, you need to use a client program.  
 
To connect with SSH or SFTP, you need to use a client program.  
  
 +
{{Note| '''X11 vs VNC:'''<br></br>
 +
X forwarding sends a single application window, typically without compression or network optimization. VNC sends the entire desktop and is optimized for networked usage, such as persisting after an accidental disconnect. The former uses the default port range 6000+N, the latter 5900+N.|reminder}}
  
 
== Windows Clients ==
 
== Windows Clients ==
Line 19: Line 20:
 
Input your [[user account|user ID]], password and server IP address as appropriate.
 
Input your [[user account|user ID]], password and server IP address as appropriate.
  
== SSH Port forwarding or tunnelling ==
+
== SSH Port forwarding (tunneling) ==
SSH can improve security. If a HTTP connection is too insecure, and you are not on a VPN, consider using SSH to connect to the GitLab or MediaWiki services. In simple terms, your application (e.g. browser, git client) talks to a localhost port instead of an external address/port, the SSH connection then transparently forwards that data.
+
In simple terms, you first setup a tunnel running in the background, e.g. a minimized PuTTy terminal. After that your main application (e.g. browser, git client, VNC/X11 client) talks to a localhost port instead of directly addressing an external address/port; the SSH connection transparently forwards that data.
  
 
The syntax in powershell or bash is:
 
The syntax in powershell or bash is:
 
`ssh -L local_port:remote_address:remote_port username@server.com`
 
`ssh -L local_port:remote_address:remote_port username@server.com`
You can then leave that tunnel open in the background, traffic targeting localport will move through it. This will be the recommended method to connecting with Jupyter Notebooks once the firewalls are hardened.
+
You can then leave that tunnel open in the background, traffic targeting localport will move through it. This will be the recommended method for connecting (including Jupyter Notebooks) once the firewalls are hardened.
  
 
== See also ==
 
== See also ==
 
* [https://www.jetbrains.com/help/pycharm/configuring-remote-interpreters-via-ssh.html Using PyCharm with a remote interpreter]
 
* [https://www.jetbrains.com/help/pycharm/configuring-remote-interpreters-via-ssh.html Using PyCharm with a remote interpreter]

Revision as of 10:31, 20 May 2020

Shell access is arguably the most important feature of the GPU cluster, as it allows researchers to run their code, e.g. using the anaconda environment.

SSH allows commandline access to the connected server.

SFTP allows file transfers. They normally also include an SSH terminal feature.

In addition, remote desktop solutions such as VNC or X forwarding typically depend on shell (SSH tunnel) access.

To connect with SSH or SFTP, you need to use a client program.

X11 vs VNC:

X forwarding sends a single application window, typically without compression or network optimization. VNC sends the entire desktop and is optimized for networked usage, such as persisting after an accidental disconnect. The former uses the default port range 6000+N, the latter 5900+N.

Windows Clients

  • Modern powershell or PuTTy are some of the many clients available for SSH
  • WinSCP or Filezilla are typical SFTP clients.
  • realVNC is a known VNC client
  • Xming is a known X server/client

Input your user ID, password and server IP address as appropriate.

SSH Port forwarding (tunneling)

In simple terms, you first setup a tunnel running in the background, e.g. a minimized PuTTy terminal. After that your main application (e.g. browser, git client, VNC/X11 client) talks to a localhost port instead of directly addressing an external address/port; the SSH connection transparently forwards that data.

The syntax in powershell or bash is: ssh -L local_port:remote_address:remote_port username@server.com You can then leave that tunnel open in the background, traffic targeting localport will move through it. This will be the recommended method for connecting (including Jupyter Notebooks) once the firewalls are hardened.

See also