Difference between revisions of "SSH"

From HPC Wiki
Jump to navigation Jump to search
()
Line 1: Line 1:
 
== General ==
 
== General ==
Secure Shell (ssh) is a [[shell|commandline]]-tool for logging into a different computer over some network (e.g. the internet) and for executing commands on that machine, as if one would be sitting there instead of the own computer. So you use ssh to build a connection to the other computer and can then interact with it, using it's [[shell]]. It is commonly used to [[Getting_Started#Log-in_or_.22How-to-now-actually-connect-to-the-supercomputer.22|log-in]] to the [[Nodes#Log-In|frontend Nodes]] of a supercomputer.
+
Secure Shell (ssh) is a [[shell|commandline]]-tool for logging into a different computer over some network (e.g. the internet) and for executing commands on that machine, as if one would be sitting there instead of the own computer. So you use ssh to build a connection to the other computer and can then interact with it, using it's [[shell]]. It is commonly used to [[Getting_Started#Login_or_.22How-to-now-actually-connect-to-the-supercomputer.22|login]] to the [[Nodes#Login|frontend Nodes]] of a supercomputer.
  
 
== Access ==
 
== Access ==
 
OpenSSH is the standard ssh client on Linux and Mac and it is freely available for everyone. On Windows you can use Putty or the GitBash (coming with ssh) which is also free.
 
OpenSSH is the standard ssh client on Linux and Mac and it is freely available for everyone. On Windows you can use Putty or the GitBash (coming with ssh) which is also free.
  
Sometimes this access is restricted, so you can only connect, when you are within the university/facility and its network. To still access the Log-in Nodes externally, one can 'pretend to be inside the network' by using a [[VPN|Virtual Private Network (VPN)]].
+
Sometimes this access is restricted, so you can only connect, when you are within the university/facility and its network. To still access the Login Nodes externally, one can 'pretend to be inside the network' by using a [[VPN|Virtual Private Network (VPN)]].
  
 
== Usage ==
 
== Usage ==
Line 12: Line 12:
 
  $ ssh -l <login> <cluster>
 
  $ ssh -l <login> <cluster>
  
Here <code><login></code> is your username and <code><cluster></code> is one of the [[Nodes#Log-In|frontend nodes]] of the system, you are trying to connect to.
+
Here <code><login></code> is your username and <code><cluster></code> is one of the [[Nodes#Login|frontend nodes]] of the system, you are trying to connect to.
  
 
If you need to start graphical applications you need to enable X11 forwarding/X11 tunneling by your ssh client.  
 
If you need to start graphical applications you need to enable X11 forwarding/X11 tunneling by your ssh client.  

Revision as of 12:36, 16 April 2018

General

Secure Shell (ssh) is a commandline-tool for logging into a different computer over some network (e.g. the internet) and for executing commands on that machine, as if one would be sitting there instead of the own computer. So you use ssh to build a connection to the other computer and can then interact with it, using it's shell. It is commonly used to login to the frontend Nodes of a supercomputer.

Access

OpenSSH is the standard ssh client on Linux and Mac and it is freely available for everyone. On Windows you can use Putty or the GitBash (coming with ssh) which is also free.

Sometimes this access is restricted, so you can only connect, when you are within the university/facility and its network. To still access the Login Nodes externally, one can 'pretend to be inside the network' by using a Virtual Private Network (VPN).

Usage

Logging in with OpenSSH on a Linux Cluster is done with:

$ ssh -l <login> <cluster>

Here <login> is your username and <cluster> is one of the frontend nodes of the system, you are trying to connect to.

If you need to start graphical applications you need to enable X11 forwarding/X11 tunneling by your ssh client. For OpenSSH this is done by giving it the command line option -X (or -Y if the previous did not work):

$ ssh -X -l <login> <cluster>

This might or might not work depending on the your operating system, because it requires an X11-Server running on your local machine, which is not available by default on Mac and Windows. To utilize graphical tools anyway, you might want to look into FastX, which provides the necessary functionality for Mac and Windows.

For more security and ease of use you should consider setting up authentication via ssh keys.

FAQs

slightly longer description

ssh manpage