User Tools

Site Tools


guide:connect

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
guide:connect [2013/02/12 11:55]
andyr [Logging In] Remove IP addresses and special cases, no longer needed
guide:connect [2026/06/18 19:45] (current)
ccrosby [Connecting to the CHPC]
Line 1: Line 1:
-===== Connecting to the CHPC =====+====== Connecting to the CHPC ======
  
-The CHPC hosts //three// systems of supercomputers: +The CHPC hosts a supercomputer comprising
-  * SUN +    * 1008 regular compute nodes with 24 cores and 128 GiB of RAM each;  
-    * Westmere cluster (Sun & Dell) +    * 360 regular computes nodes with 24 cores and 64 GiB of RAM each; 
-    * Nehalem cluster +    * 4 large memory nodes with 56 cores and 1TiB of RAM each; 
-    * Harpertown cluster +    * 9 [[guide:gpu|GPU]] nodes.
-    * M9000 SMP +
-    * Nvidia Quadro visualization node +
-  * GPU cluster (Supermicro) +
-    *  9x Nvidia C2070 "Fermi" cluster +
-    * 15x Nvidia C1060 "Telsa" cluster +
-  * IBM +
-    * e1350 cluster +
-    * Blue Gene/P+
  
-Each system has a single **login node** which is connected to the Internet and allows connections to the individual supercomputers of each system. 
  
-==== Logging In ====+=====Host Name=====
  
-Connections to the login nodes of the CHPC machines is via the **ssh** protocol To connect use+All these systems are accessed via a single login node: **''lengau.chpc.ac.za''**.
  
-  ssh username@login-node.chpc.ac.za +===== Logging In =====
-   +
-where **//login-node//** is replaced by the hostname for the login node of the system you wish to connect to, and //**username**// is replaced by the user name assigned to //your// account at the CHPC.+
  
-=== Hostnames ===+Connection to the login node of the CHPC cluster is via the **ssh** protocol.  To connect to the system use 
 +<code> 
 +  ssh username@lengau.chpc.ac.za 
 +</code> 
 +where //**''username''**// is replaced by the user name assigned to //your// account at the CHPC.
  
-The hostnames for all CHPC login nodes are listed below. If you are within CHPC the DNS server will return RFC 1918 addresses, if you are outside you will get globally routeable addresses. 
  
-| **System** | ^ Host Name  | 
-^ SUN | Primary address | sun.chpc.ac.za |  
-^ IBM Blue Gene  | Primary address | bgp.chpc.ac.za |  
-^ GPU | Primary address | gpu.chpc.ac.za |           
  
 +===== Dedicated scp.chpc.ac.za =====
 +A dedicated node, ''**scp.chpc.ac.za**'' is available for scp file transfers:
 +<code>
 +  scp src.tar.gz username@scp.chpc.ac.za:~/lustre/
 +</code>
  
  
 +===== Transferring Files =====
  
 +**Large data sets should be transferred by means of [[howto:globus|Globus]].  Globus is faster and more reliable than scp.**
  
 +You can also use scp or sftp to transfer files to or from your home directory on the CHPC systems.  For example
 +<code>
 +  scp src.tar.gz username@scp.chpc.ac.za:~/lustre/
 +</code>
 +to copy the file //src.tar.gz// to your lustre directory on the CHPC cluster.  **Please do not transfer files directly to lengau.chpc.ac.za.** It is a shared login node, and in order not to overload it, file transfer should be done to the dedicated scp server. Please note that storage space in your home directory is very limited.  Large amounts of data should rather be transferred to your storage space on the lustre file system.  For a ** typical ** user, there will be a symbolic link to the user's directory on lustre, hence the ~/lustre/ target.  Alternatively, you may wish to copy directly to your lustre storage, in which case you could do the following:
  
 +<code>
 +  scp src.tar.gz username@scp.chpc.ac.za:/mnt/lustre/users/username/
 +</code>
  
-==== Transferring Files ==== 
  
-Use scp or sftp to transfer files to or from your home directory on the CHPC systems For example+If you would like a more user-friendly method, consider [[https://filezilla-project.org|FileZilla]]
  
-  scp src.tar.gz username@sun.chpc.ac.za:scratch/+**Note:** use ''scp.chpc.ac.za'' as the server when transferring files.
  
-to copy the file //src.tar.gz// to your work directory on the SUN cluster. 
  
-==== MS Windows ==== 
  
-Should you be using a MS Windows computer +=====Recommended: ssh keys ===== 
 + 
 +The **best way** to connect via **ssh** is to create //ssh keys// which authenticate you instead of your password. 
 + 
 +First create your private and public keys on your main work computer.  These steps assume that is a desktop or laptop computer running Linux: 
 +<code> 
 +  ssh-keygen -t dsa 
 +</code> 
 +This creates two new files in your //.ssh// directory 
 + 
 +| //id_dsa// | your **private** key | 
 +| //id_dsa.pub// | the corresponding **public** key | 
 + 
 +It is the latter file that you need to add to the //.ssh/authorized_keys// file in your home directory on the CHPC login node. 
 + 
 +From a recent Linux distribution you can simply do this :- 
 +<code bash> 
 +  ssh-copy-id username@lengau.chpc.ac.za 
 +</code> 
 +From older Unix setups you might have to do this :- 
 +<code> 
 +  cat ~/.ssh/id_dsa.pub | ssh username@lengau.chpc.ac.za "cat >> .ssh/authorized_keys; chmod 0700 .ssh; chmod 0600 .ssh/authorized_keys" 
 +</code> 
 +And the next time you ssh or scp to the CHPC login node you won't have to use your password! 
 + 
 +====NOTE: ssh FILE PERMISSIONS==== 
 + 
 +Notice that you need to change the permissions of the //.ssh// directory and the //authorized_keys//  
 +file on the login nodes to make them private and readable by you only before ssh will use the new public key. 
 + 
 +<code> 
 +chmod -R g-rwx,o-rwx ~/.ssh 
 +</code> 
 + 
 +**You also need to make sure your home directory does not have write ''w'' enabled for group and other fields.** 
 + 
 +<code> 
 +ls -ld ~ 
 +drwxr-xr-x 19 user user 4096 Aug 15 12:01 /home/user 
 +</code> 
 + 
 +which is done with 
 +<code> 
 +chmod 0750 ~ 
 +</code> 
 +to make your entire home directory private; or 
 +<code> 
 +chmod 0755 ~ 
 +</code> 
 +to allow other users to view your files. 
 + 
 + 
 +====ssh error: REMOTE HOST IDENTIFICATION HAS CHANGED!==== 
 + 
 +This error occurs if the keys used by the host are different from that used last time you connected to it. 
 + 
 +You can use 
 + 
 +  ssh-keygen -R badhost 
 + 
 +to remove all keys associated with the host //badhost// from your ''known_hosts'' file. 
 + 
 +This is safe to do because the new host key entry will be added back in next time you ssh in. 
 + 
 + 
 +If you want to look at or edit the ''.ssh/known_hosts'' file, it is located in the ''.ssh'' sub-directory within your home directory on the //Lengau// cluster. 
 + 
 +For example, after logging in: 
 + 
 +<code bash> 
 +cd .ssh/ 
 +ls 
 +authorized_keys  id_ecdsa  id_ecdsa.pub  known_hosts 
 +</code> 
 + 
 + 
 +Once you have changed into the ''.ssh'' sub-directory you can then use an editor (e.g. ''nano known_hosts'') to edit the file and delete the bad line. 
 + 
 + 
 + 
 + 
 +===== Connecting from MS Windows ===== 
 + 
 +====Cygwin==== 
 + 
 +[[http://cygwin.com/|Cygwin]] provides all the above Linux commands for the Windows command line (and replaces the limited CMD.EXE command line). 
 + 
 +For first-timers there is nice introduction at [[http://lifehacker.com/179514/geek-to-live--introduction-to-cygwin-part-i|lifehacker]]. 
 + 
 +====MS Windows Applications==== 
 + 
 +Should you prefer a MS Windows application with a GUI
 to connect to the CHPC we suggest you download and install the open source  to connect to the CHPC we suggest you download and install the open source 
 [[wp>PuTTY]]  [[wp>PuTTY]] 
 and  and 
-[[wp>WinSCP]] clients:+[[wp>WinSCP]] clients, or alternatively MobaXterm, which has a free "home" edition.
  
 ^ Windows Application     ^ Provides      ^ Home page ^ | ^ Windows Application     ^ Provides      ^ Home page ^ |
 | PuTTY                   | ssh           | [[http://www.chiark.greenend.org.uk/~sgtatham/putty/]] | [[http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html|download]] | | PuTTY                   | ssh           | [[http://www.chiark.greenend.org.uk/~sgtatham/putty/]] | [[http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html|download]] |
 | WinSCP                  | scp/sftp      | [[http://winscp.net/]] | [[http://winscp.net/eng/download.php|download]] | | WinSCP                  | scp/sftp      | [[http://winscp.net/]] | [[http://winscp.net/eng/download.php|download]] |
 +| MobaXterm               | ssh/scp/X-Forwarding | [[http://mobaxterm.mobatek.net ]]| [[http://mobaxterm.mobatek.net/download-home-edition.html]] |
 +| Git Bash                | Whole unix environment including ssh | [[https://git-scm.com]]| [[https://git-scm.com/download/win]] |
  
-==== ssh keys ====+====ssh keys====
  
-The best way to connect via **ssh** is to create //ssh keys// which authenticate you instead of your password.+It is **strongly recommended** that you use ssh keys to connect to the CHPC To generate and configure putty-ssh to use keys please see:
  
-First create your private and public keys on your main work computer (which we assume is a desktop or laptop computer running Linux)+  * [[https://www.howtoforge.com/ssh_key_based_logins_putty|HowToForge tutorial]] 
 +  * [[http://the.earth.li/~sgtatham/putty/0.58/htmldoc/Chapter8.html|Putty-ssh documentation]]
  
-  ssh-keygen -t dsa +To generate and configure **Git** to use ssh keys please see:
-   +
-This creates two new files in your //.ssh// directory+
  
-| //id_dsa// | your **private** key | +  [[http://inchoo.net/dev-talk/how-to-generate-ssh-keys-for-git-authorization]]
-//id_dsa.pub// | the corresponding **public** key |+
  
-It is the latter file that you need to add to the //.ssh/authorized_keys// file in your home directories on the CHPC login nodes (SUN or IBM Blue Gene). 
  
-From a recent Linux distribution you can simply do this :-+====Blocked User Accounts====
  
-  ssh-copy-id username@login-node.chpc.ac.za +It may be that your account is blocked because of multiple failed logins.  
-   +Check if that is so via [[https://users.chpc.ac.za/reports/ip_check/]]
-From older Unix setups you might have to do this :-+
  
-  cat ~/.ssh/id_dsa.pub > ssh username@login-node.chpc.ac.za "cat >> .ssh/authorized_keys; chmod 0700 .ssh; chmod 0600 .ssh/authorized_keys" +It is important to note that if you had more than 6 failed login attempts, your account will be blocked and either you will have to log a call on https://users.chpc.ac.za/helpdesk or wait for 30 minutes before trying to login again. However if you wait for 30 minutes and try once again with an incorrect password, you will be locked for another 30 minutes until you login with a correct password where your username will be removed from the blocked list. Only then you will regain your 6 grace failed login attempts. 
- +
-And the next time you ssh or scp to the CHPC login node you won't have to use your password!+
  
-(Notice that you need to change the permissions of the //.ssh// directory and the //authorized_keys//  
-file on the login nodes to make them private and readable by you only before ssh will use the new public key.) 
/app/dokuwiki/data/attic/guide/connect.1360662904.txt.gz · Last modified: 2021/12/09 16:42 (external edit)