Skip to main content

More about SSH-keys

info

This part of the documentation is currently lacking, but might be updated in the near, near future.

SSH

For an intro to SSH keys and connections, please see the Software Carpentry course

Setting up an alias for SSH connection

To make it easier for you to ssh into another computer (VM or not), you can set up an alias so that you do not need to remember the IP-address of the computer each time you are establishing a SSH connection. To do this, you need to configure the config file which can be found in the .ssh folder, by adding this text:

Host debian_host 
Port 22
user debian
Hostname 158.39.74.231

Now, typing

ssh debian_host

will be equivalent to

ssh debian@158.39.74.231

You can set up multiple aliases in your config file for different computers or user accounts. The default port for SSH connections is 22.

On Linux

The config file can normally be found in ~/.ssh/config

On Windows

The config file is normally not created by default, and must be added by the user, which often can be found in the folder C:/Users/ire088/.ssh

Use nano, vi or any other editor to create the file, then add the lines above.