Logging in

When you have your account, you can login to Kebnekaise. This can be done with any number of SSH clients or with ThinLinc (the easiest option if you need a graphical interface).

Objectives

  • Login to Kebnekaise, either with ThinLinc or your SSH client of choice.

Kebnekaise login servers

Note

  • The main login node of Kebnekaise: kebnekaise.hpc2n.umu.se
  • ThinLinc login node: kebnekaise-tl.hpc2n.umu.se
    • ThinLinc through a browser (less features): https://kebnekaise-tl.hpc2n.umu.se:300/

In addition, there is a login node for the AMD-based nodes. We will talk more about this later: kebnekaise-amd.hpc2n.umu.se. For ThinLinc access: kebnekaise-amd-tl.hpc2n.umu.se

ThinLinc is recommended for this course

ThinLinc: a cross-platform remote desktop server from Cendio AB. Especially useful when you need software with a graphical interface.

This is what we recommend you use for this course, unless you have a preferred SSH client.

Using ThinLinc

  • Download the client from https://www.cendio.com/thinlinc/download.
    • Install it.
      • Windows: Run the downloaded .exe file to install.
      • macOS: Information on the ThinLinc macOS info page.
      • Linux Ubuntu: Download the .deb file. Run sudo dpkg -i PATH-TO-FILE/FILE-YOU-DOWNLOADED.deb
  • Start the client.
  • Enter the name of the server: kebnekaise-tl.hpc2n.umu.se. Enter your username.
    thinlinc
  • Go to “Options” \(->\) “Security”. Check that authentication method is set to password.
  • Go to “Options” \(->\) “Screen”. Uncheck “Full screen mode”.
  • Enter your HPC2N password. Click “Connect”
  • Click “Continue” when you are being told that the server’s host key is not in the registry. Wait for the ThinLinc desktop to open.

Password

You get your first, temporary HPC2N password from this page: HPC2N passwords.

That page can also be used to reset your HPC2N password if you have forgotten it.

Note that you are authenticating through SUPR, using that service’s login credentials!

Warning

The HPC2N password and the SUPR password are separate! The HPC2N password and your university/department password are also separate!

Exercise

Login to Kebnekaise.

  • If you are using ThinLinc, first install the ThinLinc client. If you are using another SSH client, install it first if you have not already done so.

Change password

Exercise: Change your password after first login

ONLY do this if you have logged in for the first time/is still using the termporary password you got from the HPC2N password reset service!

Changing password is done using the passwd command:

passwd

Use a good password that combines letters of different case. Do not use dictionary words. Avoid using the same password that you also use in other places.

It will first ask for your current password. Type in that and press enter. Then type in the new password, enter, and repeat. You have changed the password.

File transfers

We are not going to transfer any files as part of this course, but you may have to do so as part of your workflow when using Kebnekaise (or another HPC centre) for your research.

This section will only talk briefly about file transfers. You can find more information and examples on HPC2N’s File transfer documentation.

Linux, OS X

scp

SCP (Secure CoPy) is a simple way of transferring files between two machines that use the SSH (Secure SHell) protocol. You may use SCP to connect to any system where you have SSH (log-in) access.

These examples show how to use scp from the command-line. Graphical programs exists for doing scp transfer.

The command-lone scp program should already be installed.

Remote to local

Transfer a file from Kebnekaise to your local system, while on your local system

scp username@kebnekaise.hpc2n.umu.se:file .

Local to remote

Transfer a local file to Kebnekaise, while on your local system

scp file username@kebnekaise.hpc2n.umu.se:file

Recursive directory copy from a local system to a remote system

The directory sourcedirectory is here copied as a subdirectory to somedir

scp -r sourcedirectory/ username@kebnekaise.hpc2n.umu.se:somedir/

sftp

SFTP (SSH File Transfer Protocol or sometimes called Secure File Transfer Protocol) is a network protocol that provides file transfer over a reliable data stream.

SFTP is a command -line program on most Unix, Linux, and Mac OS X systems. It is also available as a protocol choice in some graphical file transfer programs.

Example: From a local system to a remote system

enterprise-d [~]$ sftp user@kebnekaise.hpc2n.umu.se
Connecting to kebnekaise.hpc2n.umu.se...
user@kebnekaise.hpc2n.umu.se's password:
sftp> put file.c C/file.c
Uploading file.c to /home/u/user/C/file.c
file.c                          100%    1    0.0KB/s   00:00
sftp> put -P irf.png pic/
Uploading irf.png to /home/u/user/pic/irf.png
irf.png                         100% 2100    2.1KB/s   00:00
sftp>

Windows

Here you need to download a client: WinSCP, FileZilla (sftp), PSCP/PSFTP, …

You can transfer with sftp or scp.

There is documentation in HPC2N’s documentation pages for Windows file transfers.

Editors

Since the editors on a Linux system are different to those you may be familiar with from Windows or macOS, here follows a short overview.

There are command-line editors and graphical editors. If you are connecting with a regular SSH client, it will be simplest to use a command-line editor. If you are using ThinLinc, you can use command-line editors or graphical editors as you want.

Command-line

These are all good editors for using on the command line:

They are all installed on Kebnekaise.

Of these, vi/vim as well as emacs are probably the most powerful, though the latter is better in a GUI environment. The easiest editor to use if you are not familiar with any of them is nano.

Nano

  1. Starting “nano”: Type nano FILENAME on the command line and press Enter. FILENAME is whatever you want to call your file.
  2. If FILENAME is a file that already exists, nano will open the file. If it dows not exist, it will be created.
  3. You now get an editor that looks like this: nano editor
  4. First thing to notice is that many of the commands are listed at the bottom.
  5. The ^ before the letter-commands means you should press CTRL and then the letter (while keeping CTRL down).
  6. Your prompt is in the editor window itself, and you can just type (or copy and paste) the content you want in your file.
  7. When you want to exit (and possibly save), you press CTRL and then x while holding CTRL down (this is written CTRL-x or ^x). nano will ask you if you want to save the content of the buffer to the file. After that it will exit.

There is a manual for nano here.

GUI

If you are connecting with ThinLinc, you will be presented with a graphical user interface (GUI).

From there you can either

  • open a terminal window/shell (Applications -> System Tools -> MATE Terminal)
  • or you can choose editors from the menu by going to Applications -> Accessories. This gives several editor options, of which these have a graphical interface:

If you are not familiar with any of these, a good recommendation would be to use Text Editor/gedit.

Text Editor/gedit

  1. Starting “gedit”:
    • From the menu, choose Applications -> Accessories -> Text Editor.
  2. You then get a window that looks like this: gedit editor
  3. You can open files by clicking “Open” in the top menu.
  4. Clicking the small file icon with a green plus will create a new document.
  5. Save by clicking “Save” in the menu.
  6. The menu on the top right (the three horizontal lines) gives you several other options, including “Find” and “Find and Replace”.

Keypoints

  • You can login with ThinLinc or another SSH client
  • ThinLinc is easiest if you need a GUI
  • There are several command-line editors: vi/vim, nano, emacs, …
  • And several GUI editors, which works best when using ThinLinc: gedit, pluma, atom, emacs (gui), nedit, …