Log in to Anunna: Difference between revisions

From HPCwiki
Jump to navigation Jump to search
 
(35 intermediate revisions by 10 users not shown)
Line 1: Line 1:
== Log on using ssh ==
== Log on using ssh ==
One can log into the [[B4F_cluster | B4F Cluster]] (more specifically the nfs server) using ssh. The address of the nfs server is:
One can log in to [[Anunna | Anunna]] using the '''S'''ecure '''Sh'''ell Protocol (SSH) (default port tcp 22). The address of the login server is:
   nfs01.hpcagrogenomics.wur.nl
   login.anunna.wur.nl


To log on one has to use an ssh ([http://en.wikipedia.org/wiki/Secure_Shell secure shell]) client. Such client systems are always available from Linux or MacOS systems. For Window an ssh-client may need to be installed. The most popular ssh-client for Windows is [http://www.chiark.greenend.org.uk/~sgtatham/putty/ Putty].
You will be automatically redirected to the currently valid login server. To log on one has to use an ssh ([http://en.wikipedia.org/wiki/Secure_Shell secure shell]) client. Such client systems are always available from Linux or MacOS systems. For Windows an ssh-client may need to be installed. The most popular ssh-client for Windows is [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY].


Note that current access may be restricted to certain IP-ranges. Furthermore, ssh-protocols may be prohibited on systems where port 22 is unavailable due to firewall.
Note that current access may be restricted to certain IP-ranges. Furthermore, ssh-protocols may be prohibited on systems where port 22 is unavailable due to firewall.
The ssh-connection can also be configured to work [[ssh_without_password | without password]], which means that no password needs to be provided at each log-in or secure copy attempt.
  '''IMPORTANT: the Login server can only act as access point and is not to be used for any serious CPU or RAM intensive work.'''
  '''Anything requiring even moderate resources should be [[Using_Slurm  |scheduled using SLURM!]]'''


=== CLI from a Linux/MacOSX terminal ===
=== CLI from a Linux/MacOSX terminal ===
A Command Line Interface ([http://en.wikipedia.org/wiki/Command-line_interface CLI]) ssh client is available from any Linux or MacOSX terminal. Secure shell (ssh) protocols require port 22 to be open. Should a connection be refused, the firewall settings of the system should be checked. Alternatively, local ICT regulations may prohibit the use of port 22. Wageningen UR FB-ICT for instance does not allow traffic through port 22 over WiFi to certain systems.
A Command Line Interface ([http://en.wikipedia.org/wiki/Command-line_interface CLI]) ssh client is available from any Linux or MacOSX terminal. Secure shell (ssh) protocols require port 22 to be open. Should a connection be refused, the firewall settings of the system should be checked. Alternatively, local ICT regulations may prohibit the use of port 22. Wageningen UR FB-ICT for instance does not allow traffic through port 22 over WiFi to certain systems.


<source lang='bash'>
<pre>
ssh [user name]@nfs01.hpcagrogenomics.wur.nl
ssh [user name]@login.anunna.wur.nl
</source>
</pre>
 
----
 
 
=== MobaXTerm on Windows ===
The program uses a full Cygwin stack, so commands from Mac and Linux can be used. Though MobaXTerm provides the Mobakeygen extension, which has an intuitive interface and is very convenient.
 
 
==== Connecting to the HPC with MobaXTerm ====
 
Go to '''Session''' => '''SSH''' and under remote host type fill in:
 
<nowiki>login.anunna.wur.nl</nowiki>
 
Check the box specify username and type in your username (not your email).
 
Click on OK. Accept the prompt and type in your WUR password and press enter.
 
'''NOTE:''' No characters will appear on the screen while you are typing your password
 
==== Generating an SSH key pair ====
 
# From the main menu choose '''Tools''' > MobaKeygen SSH Key Generator
# Click on '''Generate''' and move your mouse to generate entropy
# Type in a passphrase for the key
# Save keys with a meaningful name


=== PuTTY on Windows ===
=== PuTTY on Windows ===
<need a volunteer to write some text here>
Putty is a free, powerful, and widely used SSH client that runs on Windows.
It is extremely useful for those people who have a computer running Windows
on their desk but must remotely connect to a computer running UNIX/Linux.
Putty is one of a set of utilities that all work together to provide
convenient connectivity between Windows and UNIX/Linux environments.
Some of these utilities include:


== Log on to worker nodes ==
* Putty -- the SSH client
* Pageant -- the authentication agent used with Putty
* Puttygen -- the RSA key generation utility
* Pscp -- the SCP secure file copy utility
 
Depending on your tasks, the above utilities are probably your minimum
set of tools to make convenient connections and file transfers between a
computer running Windows and a computer running UNIX/Linux.
 
==== Putty Configuration ====
 
Putty is able to store the configuration or connection profiles for a
number of remote UNIX/Linix clients.  Each of profile can be created
and later edited by Right-clicking on a putty window header and choosing
"New Session...".  The minimum set of items that need to be configured for
a given connection are:
 
* Session
** Host Name [login.anunna.wur.nl]
** Saved Session name [your name for this connection]
* Terminal
** Keyboard
*** Backspace key -> Control-H
* Connection
** Data
*** Auto-login username [your remote username]
** SSH
*** Auth
**** Private key file for authentication [pathname to your .ppk file]
 
Obviously, there are many other useful things that can be configured and
customized in Putty but the above list should be considered a minimum.
Please note that after making any change to a putty session you must
explicitly save your changes.


Once logged into the nfs server, it is then possible to log on to any of the worker nodes. Logging on to the worker nodes does not require password authentication, you should therefore not be prompted to provide a password. Before logging onto a node it should be checked whether that node is busy. Status of nodes can be ascertained through the [[ BCM_on_B4F_cluster|BCM Portal]].
==== Creating an SSH Key Pair ====


<source lang='bash'>
Puttygen is the utility used for creating both a .ppk file (private
ssh [user name]@[node name]
key) and the public authorized key information.  Briefly, here are
</source>
the steps needed to create a key pair:


For instance:
* Run (double-click) the Puttygen application
* Click on "Generate"
* Replace the comment with something meaningful -- maybe your name
* Type in your passphrase (password) twice
* Save the .ppk file in a secure location on your Windows computer
* Use your mouse to copy the public key string then paste it into the ~/.ssh/authorized_keys file on the remote computer


<source lang='bash'>
Note: The full pathname of this .ppk file is used in the last step of Putty
ssh dummy001@node049
configuration as described above.
</source>


== File transfer using ssh-based file transfer protocols ==
==== Using Pageant as an Interface for Putty ====
=== Copying files to/from the cluster: scp ===


From any Posix-compliant system (Linux/MacOSX) terminal files and folder can be transferred to and from the cluster using an ssh-based file copying protocol called scp ([http://en.wikipedia.org/wiki/Secure_copy secure copy]). For instance, copying a folder containing several files from scomp1090/lx6 can be achieved like this:
Pageant is a Putty helper program that is used for two main purposes:


Syntax of the scp command requires from-to order:
* Pageant is used to hold the passphrase to your key pair
* Pageant is used as a convenience application to run a Putty session from any of your saved profiles


<source lang='bash'>
There is no configuration needed in Pageant.  You simply need to
scp FROM_SOURCE TO_DESTINATION
run this program at login.  Any easy way to do this is to create a
</source>
shortcut in your startup folder that points to the Pageant executable.
Once this has been done, every time you log in you will see a little
icon of a computer with a hat in your taskbar.  The first step in using
this is to right-click on it and select "Add Key".  Navigate to your
.ppk file and select "Open".  It will prompt you for your passphrase.
At this point your passphrase has been conveniently stored for you so
that when you use Putty to connect to your various remote computers,
you won't have to type in your passphrase over and over again.
The next step is to right-click on the Pageant icon again and select
one of your saved sessions.  If you have done everything correctly
you will be logged right in so that you no longer have to type your
passphrase.


<source lang='bash'>
== Log on to worker nodes ==
scp -pr /home/WUR/[username]/folder_to_transfer [username]@nfs01.hpcagrogenomics.wur.nl:/lustre/scratch/WUR/ABGC/
</source>


This example assumes a user that is part of the ABGC user group. See the [[Lustre_PFS_layout | Lustre Parallel File System layout]] page for further details. The -p flag will preserve the file metadata such as timestamps. The -r flag allows for recursive copying. Further options can be found in the [http://en.wikipedia.org/wiki/Man_page man pages].
In a complete emergency, it is then possible to log on to any of the worker nodes via the login node. Logging on to the worker nodes does not require password authentication, you should therefore not be prompted to provide a password. This is not normally allowed - be aware that running tasks outside of SLURM is prohibited, but so far there has not been any serious abuse of this. This is provided to allow you to get a little more insight in what your job is doing.


<source lang='bash'>
<pre>
man scp
ssh [user name]@[node name]
</source>
</pre>


=== rsync ===
For instance:
The [http://en.wikipedia.org/wiki/Rsync rsync protocol], like the scp protocol, allow CLI-based copying of files. The rsync protocol, however, will only transfer those files between systems that have changed, i.e. it synchronises the files, hence the name. The rsync protocol is very well suited for making regular backups and file syncs between file systems. Like the scp command, syntax is in the from-to order.
<source lang='bash'>
rsync FROM_SOURCE TO_DESTINATION
</source>
e.g.:
<source lang='bash'>
rsync -av /home/WUR/[username]/folder_to_transfer [username]@nfs01.hpcagrogenomics.wur.nl:/lustre/scratch/WUR/ABGC/
</source>
The -a flag will preserve file metadata and allows for recursive copying, amongst others. The -v flag provides verbose output. Further options can be found in the [http://en.wikipedia.org/wiki/Man_page man pages].
<source lang='bash'>
man scp
</source>


=== winSCP ===
<pre>
<need a windows user as a volunteer to write some text....>
ssh dummy001@node049
</pre>


=== FileZilla ===
Again, it is not permitted to run jobs outside the scheduling software (slurm). So logging on to a worker node is for analyses of running jobs only.
[http://en.wikipedia.org/wiki/Filezilla FileZilla] is a free and open source graphical (S)FTP client. It is available for Linux, MacOSX, and Windows. By providing the address, username, and password, files can be transferred between a local system and the cluster. Furthermore, the graphical interface allows for easy browsing of files on the Cluster. Detailed instruction can be found on the [https://wiki.filezilla-project.org/Using FileZilla Wiki].


=== Samba/CIFS based protocols ===
The Common Interface File System ([http://en.wikipedia.org/wiki/Cifs CIFS]) is commonly used in and between Windows systems for file sharing.


<is this going to be enabled on the Cluster?.


== See also ==
== See also ==
* [[B4F_cluster | B4F Cluster]]
* [[Using _Slurm | Submit jobs with Slurm]]
* [[ssh_without_password | ssh without password]]
* [[File_transfer | File transfer options]]


== External links ==
== External links ==
* [http://en.wikipedia.org/wiki/Secure_Shell secure shell on Wikipedia]
* [http://en.wikipedia.org/wiki/Secure_Shell secure shell on Wikipedia]
* [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY homepage]
* [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY homepage]
* [http://winscp.net/eng/index.php WinSCP homepage]
* [https://filezilla-project.org FileZilla homepage]

Latest revision as of 15:31, 10 June 2024

Log on using ssh

One can log in to Anunna using the Secure Shell Protocol (SSH) (default port tcp 22). The address of the login server is:

 login.anunna.wur.nl

You will be automatically redirected to the currently valid login server. To log on one has to use an ssh (secure shell) client. Such client systems are always available from Linux or MacOS systems. For Windows an ssh-client may need to be installed. The most popular ssh-client for Windows is PuTTY.

Note that current access may be restricted to certain IP-ranges. Furthermore, ssh-protocols may be prohibited on systems where port 22 is unavailable due to firewall.

The ssh-connection can also be configured to work without password, which means that no password needs to be provided at each log-in or secure copy attempt.

 IMPORTANT: the Login server can only act as access point and is not to be used for any serious CPU or RAM intensive work. 
 Anything requiring even moderate resources should be scheduled using SLURM!

CLI from a Linux/MacOSX terminal

A Command Line Interface (CLI) ssh client is available from any Linux or MacOSX terminal. Secure shell (ssh) protocols require port 22 to be open. Should a connection be refused, the firewall settings of the system should be checked. Alternatively, local ICT regulations may prohibit the use of port 22. Wageningen UR FB-ICT for instance does not allow traffic through port 22 over WiFi to certain systems.

ssh [user name]@login.anunna.wur.nl


MobaXTerm on Windows

The program uses a full Cygwin stack, so commands from Mac and Linux can be used. Though MobaXTerm provides the Mobakeygen extension, which has an intuitive interface and is very convenient.


Connecting to the HPC with MobaXTerm

Go to Session => SSH and under remote host type fill in:

login.anunna.wur.nl

Check the box specify username and type in your username (not your email).

Click on OK. Accept the prompt and type in your WUR password and press enter.

NOTE: No characters will appear on the screen while you are typing your password

Generating an SSH key pair

  1. From the main menu choose Tools > MobaKeygen SSH Key Generator
  2. Click on Generate and move your mouse to generate entropy
  3. Type in a passphrase for the key
  4. Save keys with a meaningful name

PuTTY on Windows

Putty is a free, powerful, and widely used SSH client that runs on Windows. It is extremely useful for those people who have a computer running Windows on their desk but must remotely connect to a computer running UNIX/Linux. Putty is one of a set of utilities that all work together to provide convenient connectivity between Windows and UNIX/Linux environments. Some of these utilities include:

  • Putty -- the SSH client
  • Pageant -- the authentication agent used with Putty
  • Puttygen -- the RSA key generation utility
  • Pscp -- the SCP secure file copy utility

Depending on your tasks, the above utilities are probably your minimum set of tools to make convenient connections and file transfers between a computer running Windows and a computer running UNIX/Linux.

Putty Configuration

Putty is able to store the configuration or connection profiles for a number of remote UNIX/Linix clients. Each of profile can be created and later edited by Right-clicking on a putty window header and choosing "New Session...". The minimum set of items that need to be configured for a given connection are:

  • Session
    • Host Name [login.anunna.wur.nl]
    • Saved Session name [your name for this connection]
  • Terminal
    • Keyboard
      • Backspace key -> Control-H
  • Connection
    • Data
      • Auto-login username [your remote username]
    • SSH
      • Auth
        • Private key file for authentication [pathname to your .ppk file]

Obviously, there are many other useful things that can be configured and customized in Putty but the above list should be considered a minimum. Please note that after making any change to a putty session you must explicitly save your changes.

Creating an SSH Key Pair

Puttygen is the utility used for creating both a .ppk file (private key) and the public authorized key information. Briefly, here are the steps needed to create a key pair:

  • Run (double-click) the Puttygen application
  • Click on "Generate"
  • Replace the comment with something meaningful -- maybe your name
  • Type in your passphrase (password) twice
  • Save the .ppk file in a secure location on your Windows computer
  • Use your mouse to copy the public key string then paste it into the ~/.ssh/authorized_keys file on the remote computer

Note: The full pathname of this .ppk file is used in the last step of Putty configuration as described above.

Using Pageant as an Interface for Putty

Pageant is a Putty helper program that is used for two main purposes:

  • Pageant is used to hold the passphrase to your key pair
  • Pageant is used as a convenience application to run a Putty session from any of your saved profiles

There is no configuration needed in Pageant. You simply need to run this program at login. Any easy way to do this is to create a shortcut in your startup folder that points to the Pageant executable. Once this has been done, every time you log in you will see a little icon of a computer with a hat in your taskbar. The first step in using this is to right-click on it and select "Add Key". Navigate to your .ppk file and select "Open". It will prompt you for your passphrase. At this point your passphrase has been conveniently stored for you so that when you use Putty to connect to your various remote computers, you won't have to type in your passphrase over and over again. The next step is to right-click on the Pageant icon again and select one of your saved sessions. If you have done everything correctly you will be logged right in so that you no longer have to type your passphrase.

Log on to worker nodes

In a complete emergency, it is then possible to log on to any of the worker nodes via the login node. Logging on to the worker nodes does not require password authentication, you should therefore not be prompted to provide a password. This is not normally allowed - be aware that running tasks outside of SLURM is prohibited, but so far there has not been any serious abuse of this. This is provided to allow you to get a little more insight in what your job is doing.

ssh [user name]@[node name]

For instance:

ssh dummy001@node049

Again, it is not permitted to run jobs outside the scheduling software (slurm). So logging on to a worker node is for analyses of running jobs only.


See also

External links