Skip to content

ssh

From Wikipedia:

The Secure Shell Protocol (SSH) is a cryptographic network protocol for operating network services securely over an unsecured network.

At UPPMAX we allow users to login via SSH, using the program ssh.

SSH key management

For WSL2 under Windows10 or Windows11, here as a neat way to get persistent key-manager in WSL2 (credits: original source).

sudo apt-get install keychain

Replace XXXX with the output of hostname command on the command line.

/usr/bin/keychain -q --nogui $HOME/.ssh/id_ed25519_key
source $HOME/.keychain/XXXX-sh

Remove -q to get some information if you want

* keychain 2.8.5 ~ http://www.funtoo.org
* Found existing ssh-agent: 4487
* Known ssh key: /home/user/.ssh/id_ed25519_key

First time you login, you will be asked for the password and the key will be handled by the key-manager. Check with

ssh-add -l
256 SHA256:wLJvQOM....   ....cTTtiU MyNewKey (ED25519)

MobaXterm

In MobaXterm you can use the internal MobAgent or/and the Peagent from the PuTTy tools.

MobaXterm

OPTIONAL: SSH config

Example $HOME/.ssh/config file to make your work easier.

Host rackham
User username
HostName rackham.uppmax.uu.se
ServerAliveInterval 240
ServerAliveCountMax 2

# Default settings
#=======================================
Host *
ForwardAgent no
ForwardX11 yes
ForwardX11Trusted yes
ServerAliveInterval 120
#=======================================

Now

# without config
ssh -X username@rackham.uppmax.uu.se
# with config
ssh rackham

# without config
scp local_file username@rackham.uppmax.uu.se:remote_folder/
# with config
scp local_file rackham:remote_folder/

rsync ...
sftp ...