Linux Server setup

SSH connection under Linux

The Linux operating system usually does not have SSH client integrated by default. Let's first check if SSH is installed and if not let's get it.


Check if SSH is installed

First we open a terminal window with the key combination CTRL+ALT+T.

To check if the ssh command is available, we query the SSH version number with the -V parameter:


__$ ssh -V
 

If a version number appears, OpenSSH is already installed. You can skip the installation or run it anyway to be sure you are getting the latest version.

To install/upgrade the OpenSSH client, run the following command:


__$ sudo apt update && sudo apt install openssh-client
 

SSH connection

With the ssh command we establish a connection. As parameters we specify the username followed by a @ and the IP address of the server.


__$ ssh tom@116.203.69.89
 

Without explicit port specification, the default SSH port 22 is used.

A different port can be specified with the -p parameter. A connection via port 23 would then look like this: ssh tom@116.203.69.89 -p 23.

Since our server is freshly set up, we connect without parameters by default.

At the very first connection we are asked if the new connection is trusted and the address should be added to the list of known servers. We confirm this by entering yes. This is followed by a password query.

There should be a welcome message from the server. If bash displays the logged in user (tom@srv1:~$), then that is a sure sign of a successful login.

SSH via terminal
accept unknown server
login
logged in (welcome message)