Jump to content

SSH Access: Difference between revisions

From HPCwiki
m <source> to <pre> to fix code blocks
m Protected "SSH Access": Secure the SSH host keys ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== Log on using ssh ==
This page explains how to connect to Anunna over SSH. Once you are logged in, see [[Login Nodes]] for what the login nodes are for, and [[Policies and Terms of Use]] for the rules that apply.
One can log in to [[Anunna | Anunna]] using 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 ([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].
== Connecting ==


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.
You log in to Anunna using the Secure Shell protocol (SSH) on the default port (TCP 22). The address of the login server is:


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.
login.anunna.wur.nl


  '''IMPORTANT: the Login server can only act as access point and is not to be used for any serious CPU or RAM intensive work.'''
You are automatically redirected to a currently valid login server. An SSH client is built in on Linux and macOS; on Windows you usually install one, such as [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY] or MobaXTerm.
  '''Anything requiring even moderate resources should be [[Using_Slurm  |scheduled using SLURM!]]'''


=== CLI from a Linux/MacOSX terminal ===
On first login, your client might say something like this:<syntaxhighlight lang="shell">
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.
Warning: Permanently added 'login.anunna.wur.nl' (ED25519) to the list of known hosts.
</syntaxhighlight>This is normal behaviour for a first connection to a SSH server.


<pre>
If you want to check whether your first connection used the right machine, you can do this:<syntaxhighlight lang="shell">
ssh [user name]@login.anunna.wur.nl
cat ~/.ssh/known_hosts
</pre>
# should give:
login.anunna.wur.nl ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGwhEWBzyLKi5wZHBN0MeqYm45LSrDPMa6zQU/A1qGv3
</syntaxhighlight>Compare that against the following list, if all is well your key should be in there:<syntaxhighlight lang="shell">
login.anunna.wur.nl ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDoGfjT0F04SvHqQ7Ipv4uSiU7+Zno4Tdkg3fFkteo7GhqUw/bKMrESy26fss7f6iZyz7pLjbV21IZeMEYnVRj8e8PNwq/v63pbiMtly2e6HcUBTZJPEC0WcYnCP7j21koXrr5aDy9K1g60swyGIPAj0EuFisrq2fSHDm+z3XFQiLj23WL2KxueAndlB7XiWK3ZLlHc0aTQb0QpYvTD8uwHMxROuNZxgFsB6p4TQKKWayM8SXsgtxULIQ89NWgz500nOhCnZwRM6Ef/JzKoXM7z2s+5N3zjZZMGYZ3ItYI/u5HbTj7bSgazkqvvVOFU/6LIn9eoxsVy9X6hjKTYgCDl
login.anunna.wur.nl ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBI5+8Vb26kEhoEmh+KrczHbw5zOGAhO/utZxBkevPeArGVHTiEyhIib178rjpRq9eh+zwUwsj/KJK8j+4+4tNtA=
login.anunna.wur.nl ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGwhEWBzyLKi5wZHBN0MeqYm45LSrDPMa6zQU/A1qGv3
</syntaxhighlight>


=== PuTTY on Windows ===
Note that access may be restricted to certain IP ranges, and SSH may be blocked (see [[Unblocking your IP|here]]) where port 22 is closed by a firewall. (For example, WUR FB-IT does not allow port 22 over WiFi to certain systems.)
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
'''The login server is an access point only — it is not for CPU- or memory-intensive work.''' Anything beyond light, interactive use belongs in a job; see [[Login Nodes]] and [[Scheduler Overview (Slurm)]].
* 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
=== Linux and macOS ===
set of tools to make convenient connections and file transfers between a
computer running Windows and a computer running UNIX/Linux.


==== Putty Configuration ====
An SSH client is available from any Linux or macOS terminal:


Putty is able to store the configuration or connection profiles for a
<syntaxhighlight lang="bash">
number of remote UNIX/Linix clients.  Each of profile can be created
ssh <username>@login.anunna.wur.nl
and later edited by Right-clicking on a putty window header and choosing
</syntaxhighlight>
"New Session...".  The minimum set of items that need to be configured for
a given connection are:


* Session
If the connection is refused, check if your IP is (temporarily) banned from connecting: https://unban.anunna.wur.nl/unban
** 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
=== Windows ===
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 ====
On Windows you connect with an SSH client such as '''MobaXTerm''' or '''PuTTY'''. In either case, set the remote host to <code>login.anunna.wur.nl</code> and enter your username (not your email address) and WUR password. No characters appear while you type your password — this is normal.


Puttygen is the utility used for creating both a .ppk file (private
For key-based login, generate an SSH key pair with the client's key generator (MobaKeygen in MobaXTerm, or PuTTYgen for PuTTY), protect it with a passphrase, and add the public key to <code>~/.ssh/authorized_keys</code> on Anunna. PuTTY users can hold the key in Pageant so they do not have to type the passphrase each time. See the [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY homepage] for full instructions.
key) and the public authorized key information. Briefly, here are
the steps needed to create a key pair:


* Run (double-click) the Puttygen application
== Logging in without a password ==
* 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
You can configure SSH to log in without typing your password each time; see [[ssh_without_password|SSH without password]].
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.
 
<pre>
ssh [user name]@[node name]
</pre>
 
For instance:
 
<pre>
ssh dummy001@node049
</pre>
 
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.


== Connecting to a compute node ==


To open a shell or a direct connection on a compute node where your job is running, see [[Compute Nodes]].


== See also ==
== See also ==
* [[Using _Slurm | Submit jobs with Slurm]]
* [[Unblocking your IP]]
* [[ssh_without_password | ssh without password]]
* [[Login Nodes]]
* [[File_transfer | File transfer options]]
* [[Compute Nodes]]
* [[Data Transfer Methods]]
* [[Create shortcut log-in command]] — SSH aliases and ~/.ssh/config shortcuts
* [[ssh_without_password|SSH without password]]
* [[Scheduler Overview (Slurm)]]


== 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]

Latest revision as of 12:31, 10 November 2026

This page explains how to connect to Anunna over SSH. Once you are logged in, see Login Nodes for what the login nodes are for, and Policies and Terms of Use for the rules that apply.

Connecting

You log in to Anunna using the Secure Shell protocol (SSH) on the default port (TCP 22). The address of the login server is:

login.anunna.wur.nl

You are automatically redirected to a currently valid login server. An SSH client is built in on Linux and macOS; on Windows you usually install one, such as PuTTY or MobaXTerm.

On first login, your client might say something like this:

Warning: Permanently added 'login.anunna.wur.nl' (ED25519) to the list of known hosts.

This is normal behaviour for a first connection to a SSH server. If you want to check whether your first connection used the right machine, you can do this:

cat ~/.ssh/known_hosts
# should give:
login.anunna.wur.nl ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGwhEWBzyLKi5wZHBN0MeqYm45LSrDPMa6zQU/A1qGv3

Compare that against the following list, if all is well your key should be in there:

login.anunna.wur.nl ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDoGfjT0F04SvHqQ7Ipv4uSiU7+Zno4Tdkg3fFkteo7GhqUw/bKMrESy26fss7f6iZyz7pLjbV21IZeMEYnVRj8e8PNwq/v63pbiMtly2e6HcUBTZJPEC0WcYnCP7j21koXrr5aDy9K1g60swyGIPAj0EuFisrq2fSHDm+z3XFQiLj23WL2KxueAndlB7XiWK3ZLlHc0aTQb0QpYvTD8uwHMxROuNZxgFsB6p4TQKKWayM8SXsgtxULIQ89NWgz500nOhCnZwRM6Ef/JzKoXM7z2s+5N3zjZZMGYZ3ItYI/u5HbTj7bSgazkqvvVOFU/6LIn9eoxsVy9X6hjKTYgCDl
login.anunna.wur.nl ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBI5+8Vb26kEhoEmh+KrczHbw5zOGAhO/utZxBkevPeArGVHTiEyhIib178rjpRq9eh+zwUwsj/KJK8j+4+4tNtA=
login.anunna.wur.nl ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGwhEWBzyLKi5wZHBN0MeqYm45LSrDPMa6zQU/A1qGv3

Note that access may be restricted to certain IP ranges, and SSH may be blocked (see here) where port 22 is closed by a firewall. (For example, WUR FB-IT does not allow port 22 over WiFi to certain systems.)

The login server is an access point only — it is not for CPU- or memory-intensive work. Anything beyond light, interactive use belongs in a job; see Login Nodes and Scheduler Overview (Slurm).

Linux and macOS

An SSH client is available from any Linux or macOS terminal:

ssh <username>@login.anunna.wur.nl

If the connection is refused, check if your IP is (temporarily) banned from connecting: https://unban.anunna.wur.nl/unban

Windows

On Windows you connect with an SSH client such as MobaXTerm or PuTTY. In either case, set the remote host to login.anunna.wur.nl and enter your username (not your email address) and WUR password. No characters appear while you type your password — this is normal.

For key-based login, generate an SSH key pair with the client's key generator (MobaKeygen in MobaXTerm, or PuTTYgen for PuTTY), protect it with a passphrase, and add the public key to ~/.ssh/authorized_keys on Anunna. PuTTY users can hold the key in Pageant so they do not have to type the passphrase each time. See the PuTTY homepage for full instructions.

Logging in without a password

You can configure SSH to log in without typing your password each time; see SSH without password.

Connecting to a compute node

To open a shell or a direct connection on a compute node where your job is running, see Compute Nodes.

See also