Difference between revisions of "HOWTO login"

From HPC
(Windows clients)
m (VPN ACCESS OFF CAMPUS)
 
(21 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
== SSH connection details ==
 +
 +
=== HPC1 (also known as Rhasatsha) ===
 +
 +
Use the following connection details to log in:
 +
* '''Host Name''': hpc1.sun.ac.za
 +
* '''Port''': 22 (the default)
 +
* '''Connection type''': SSH (the default)
 +
 +
Please note that your username and password are the same as for your email.
 +
 +
=== HPC2 (also known as CAF-HPC1) ===
 +
 +
Use the following connection details to log in:
 +
* '''Host Name''': hpc2.sun.ac.za
 +
* '''Port''': 22 (the default)
 +
* '''Connection type''': SSH (the default)
 +
 +
Please note that your username and password are the same as for your email.
 +
 +
=== VPN ACCESS OFF CAMPUS ===
 +
 +
You will only be able to connect to the HPC while on campus (wired only, '''no Wifi access'''), or if you have a VPN connection open to campus.  There are two  VPN software options; the Citrix VPN client or PaloAlto GlobalProtect.
 +
 +
Citrix VPN. Download it from https://securevpn.sun.ac.za and run it before trying to ssh to the HPC. 
 +
 +
GlobalProtect Read the HowTo on https://servicedesk.sun.ac.za/kb/display/ITHUB/Global+Protect+VPN
 +
 +
When on campus, do NOT use the VPN because you are connected to the real Stellenbosch network and do not need the Virtual adapter.
 +
 
== SSH clients ==
 
== SSH clients ==
  
Line 8: Line 38:
 
* job submission
 
* job submission
  
== Linux / MacOS X clients ==
+
== Linux / macOS clients ==
  
 
Use the Terminal or Konsole to SSH to the cluster using the <code>ssh</code> command in the form:
 
Use the Terminal or Konsole to SSH to the cluster using the <code>ssh</code> command in the form:
  
 
<code>$ ssh '''username'''@hpc1.sun.ac.za</code>
 
<code>$ ssh '''username'''@hpc1.sun.ac.za</code>
 +
 +
<code>$ ssh '''username'''@hpc2.sun.ac.za</code>
  
 
To transfer files, use Konqueror (if you are using KDE) and the <code>fish</code> command in the form:
 
To transfer files, use Konqueror (if you are using KDE) and the <code>fish</code> command in the form:
Line 18: Line 50:
 
<code>fish://'''username'''@hpc1.sun.ac.za</code>
 
<code>fish://'''username'''@hpc1.sun.ac.za</code>
  
If you are using Gnome, open Gnome Commander and create a new ''Remote Connection''. You can also use the Terminal or Konsole to transfer files using the <code>scp</code> command.
+
<code>fish://'''username'''@hpc2.sun.ac.za</code>
 +
 
 +
If you are using Gnome, open Gnome Commander and create a new ''Remote Connection''.
 +
 
 +
You can also use the Terminal or Konsole to transfer files using the <code>scp</code> command.
 +
 
 +
To copy a file '''localfile''' from your machine to your home directory on the HPC, use <code>scp localfile '''username'''@hpc1.sun.ac.za:~/</code>.
 +
To copy a file '''remotefile''' from the HPC to your local machine in the current directory, use <code>scp '''username'''@hpc1.sun.ac.za:~/pathtofile/remotefile .</code>.
 +
 
 +
To copy an entire directory '''localdir''', use <code>scp -r localdir '''username'''@hpc1.sun.ac.za:~/</code>.
 +
 
 +
This list of commands is not exhaustive, see the <code>scp</code> man pages, or google it.
  
 
To enable X11 forwarding, use the <code>-X</code> parameter with SSH:
 
To enable X11 forwarding, use the <code>-X</code> parameter with SSH:
  
 
<code>$ ssh -X '''username'''@hpc1.sun.ac.za</code>
 
<code>$ ssh -X '''username'''@hpc1.sun.ac.za</code>
 +
 +
<code>$ ssh -X '''username'''@hpc2.sun.ac.za</code>
  
 
== Windows clients ==
 
== Windows clients ==
  
Files are transferred with the Secure Copy Protocol (SCP). The excellent [http://winscp.net/ WinSCP] program makes this really easy.
+
Files are transferred with the Secure Copy Protocol (SCP). [http://mobaxterm.mobatek.net/ MobaXterm] and [http://winscp.net/ WinSCP] make this really easy.
  
Jobs are submitted from the console (also called command line). [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html PuTTY] and [http://en.sourceforge.jp/projects/ttssh2/releases/ TeraTerm Pro] are two SSH clients which will allow console access.
+
Jobs are submitted from the console (also called command line). [http://mobaxterm.mobatek.net/ MobaXterm], [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html PuTTY] and [http://en.sourceforge.jp/projects/ttssh2/releases/ TeraTerm Pro] are SSH clients which will allow console access.
  
=== PuTTY ===
+
=== MobaXterm ===
 +
 
 +
Install from http://mobaxterm.mobatek.net/ (or [https://hpc1.sun.ac.za/MobaXterm_Setup_9.4.msi local copy], possibly outdated). A very nice client that combines SSH client, SCP client and X11 server. Install this or a combination of the programs below.
  
Install from http://support.sun.ac.za/Utilities/PuTTY.
+
MobaXterm sometimes has issues with transferring large amounts of data. Use [[WinSCP]] instead if you run into trouble.
  
Use the following connection details to log in:
+
=== PuTTY ===
* '''Host Name''': hpc1.sun.ac.za
 
* '''Port''': 22 (the default)
 
* '''Connection type''': SSH (the default)
 
  
You will be prompted for your username and password after you click ''Open''. Please note that your username and password are the same as for your email.
+
Install from http://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html (or [http://support.sun.ac.za/Utilities/PuTTY local copy], only available on campus, possibly outdated).
  
 
=== TeraTerm Pro ===
 
=== TeraTerm Pro ===
  
Install from http://support.sun.ac.za/TeraTerm.
+
Install from https://osdn.net/projects/ttssh2/releases (or [http://support.sun.ac.za/TeraTerm local copy], only available on campus, possibly outdated).
 
 
Use the following connection details to log in:
 
* '''Host Name''': hpc1.sun.ac.za
 
* '''Port''': 22 (the default)
 
* '''Connection type''': SSH (the default)
 
 
 
You will be prompted for your username and password after you click ''OK''. Please note that your username and password are the same as for your email.
 
  
 
=== WinSCP ===
 
=== WinSCP ===
  
Install from http://support.sun.ac.za/Utilities/WinScp.
+
Install from https://winscp.net/eng/download.php (or [http://support.sun.ac.za/Utilities/WinScp local copy], only available on campus, possibly outdated).
 
 
Use the following connection details to log in:
 
* '''File protocol''': SFTP (the default)
 
* '''Host name''': hpc1.sun.ac.za
 
* '''Port number''': 22 (the default)
 
* '''Username''': Your username (same as for email)
 
* '''Password''': Your password (same as for email)
 
  
 
=== Xming ===
 
=== Xming ===
Line 67: Line 97:
 
Install from http://sourceforge.net/projects/xming.
 
Install from http://sourceforge.net/projects/xming.
  
Xming allows graphical programs to run on the cluster, but display on your own Windows machine. For it to work correctly, '''X11 forwarding''' must be enabled in your SSH client. In TeraTerm Pro enable it in the ''Setup|SSH Forwarding...'' menu (remember to ''Setup|Save setup...'' and restart TeraTerm Pro). In PuTTY, enable it in the ''Connection|SSH|X11'' menu on the left when connecting to the server.
+
Xming allows graphical programs to run on the cluster, but display on your own Windows machine. For it to work correctly, '''X11 forwarding''' must be enabled in your SSH client. In TeraTerm Pro enable it in the ''Setup|SSH Forwarding...'' menu (remember to ''Setup|Save setup...'' and restart TeraTerm Pro). In PuTTY, enable it in the ''Connection|SSH|X11'' menu on the left when connecting to the server. You do not need this if you have MobaXterm.
  
 
Once your SSH connection is open, check whether it works by seeing whether the <code>DISPLAY</code> variable is set:
 
Once your SSH connection is open, check whether it works by seeing whether the <code>DISPLAY</code> variable is set:
 
<pre>
 
<pre>
[username@launch ~]$ export | grep DISPLAY
+
[username@hpc1 ~]$ export | grep DISPLAY
 
declare -x DISPLAY="localhost:10.0"
 
declare -x DISPLAY="localhost:10.0"
 
</pre>
 
</pre>
Line 77: Line 107:
 
Make sure Xming is running in the system tray, and then run a program in your SSH console which has a graphical frontend (like <code>xterm</code>):
 
Make sure Xming is running in the system tray, and then run a program in your SSH console which has a graphical frontend (like <code>xterm</code>):
 
<pre>
 
<pre>
[username@launch ~]$ xterm
+
[username@hpc1 ~]$ xterm
 
</pre>
 
</pre>
  
 
A graphical xterm console should open on your Windows desktop.
 
A graphical xterm console should open on your Windows desktop.
 +
 +
Please note that you do not need to install this if you use MobaXterm.

Latest revision as of 20:20, 30 January 2023

SSH connection details

HPC1 (also known as Rhasatsha)

Use the following connection details to log in:

  • Host Name: hpc1.sun.ac.za
  • Port: 22 (the default)
  • Connection type: SSH (the default)

Please note that your username and password are the same as for your email.

HPC2 (also known as CAF-HPC1)

Use the following connection details to log in:

  • Host Name: hpc2.sun.ac.za
  • Port: 22 (the default)
  • Connection type: SSH (the default)

Please note that your username and password are the same as for your email.

VPN ACCESS OFF CAMPUS

You will only be able to connect to the HPC while on campus (wired only, no Wifi access), or if you have a VPN connection open to campus. There are two VPN software options; the Citrix VPN client or PaloAlto GlobalProtect.

Citrix VPN. Download it from https://securevpn.sun.ac.za and run it before trying to ssh to the HPC.

GlobalProtect Read the HowTo on https://servicedesk.sun.ac.za/kb/display/ITHUB/Global+Protect+VPN

When on campus, do NOT use the VPN because you are connected to the real Stellenbosch network and do not need the Virtual adapter.

SSH clients

All interaction with the cluster is done securely with SSH.

Your interaction with the cluster will entail two major activities:

  • file transfer
  • job submission

Linux / macOS clients

Use the Terminal or Konsole to SSH to the cluster using the ssh command in the form:

$ ssh username@hpc1.sun.ac.za

$ ssh username@hpc2.sun.ac.za

To transfer files, use Konqueror (if you are using KDE) and the fish command in the form:

fish://username@hpc1.sun.ac.za

fish://username@hpc2.sun.ac.za

If you are using Gnome, open Gnome Commander and create a new Remote Connection.

You can also use the Terminal or Konsole to transfer files using the scp command.

To copy a file localfile from your machine to your home directory on the HPC, use scp localfile username@hpc1.sun.ac.za:~/. To copy a file remotefile from the HPC to your local machine in the current directory, use scp username@hpc1.sun.ac.za:~/pathtofile/remotefile ..

To copy an entire directory localdir, use scp -r localdir username@hpc1.sun.ac.za:~/.

This list of commands is not exhaustive, see the scp man pages, or google it.

To enable X11 forwarding, use the -X parameter with SSH:

$ ssh -X username@hpc1.sun.ac.za

$ ssh -X username@hpc2.sun.ac.za

Windows clients

Files are transferred with the Secure Copy Protocol (SCP). MobaXterm and WinSCP make this really easy.

Jobs are submitted from the console (also called command line). MobaXterm, PuTTY and TeraTerm Pro are SSH clients which will allow console access.

MobaXterm

Install from http://mobaxterm.mobatek.net/ (or local copy, possibly outdated). A very nice client that combines SSH client, SCP client and X11 server. Install this or a combination of the programs below.

MobaXterm sometimes has issues with transferring large amounts of data. Use WinSCP instead if you run into trouble.

PuTTY

Install from http://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html (or local copy, only available on campus, possibly outdated).

TeraTerm Pro

Install from https://osdn.net/projects/ttssh2/releases (or local copy, only available on campus, possibly outdated).

WinSCP

Install from https://winscp.net/eng/download.php (or local copy, only available on campus, possibly outdated).

Xming

Install from http://sourceforge.net/projects/xming.

Xming allows graphical programs to run on the cluster, but display on your own Windows machine. For it to work correctly, X11 forwarding must be enabled in your SSH client. In TeraTerm Pro enable it in the Setup|SSH Forwarding... menu (remember to Setup|Save setup... and restart TeraTerm Pro). In PuTTY, enable it in the Connection|SSH|X11 menu on the left when connecting to the server. You do not need this if you have MobaXterm.

Once your SSH connection is open, check whether it works by seeing whether the DISPLAY variable is set:

[username@hpc1 ~]$ export | grep DISPLAY
declare -x DISPLAY="localhost:10.0"

Make sure Xming is running in the system tray, and then run a program in your SSH console which has a graphical frontend (like xterm):

[username@hpc1 ~]$ xterm

A graphical xterm console should open on your Windows desktop.

Please note that you do not need to install this if you use MobaXterm.