+5 votes
63 views
Install SSH on Ubuntu 20.04

in Linux/Unix by (313k points)
reopened | 63 views

1 Answer

+3 votes
Best answer

SSH (Secure Shell) is a remote administration protocol thanks to which we have the possibility to control, manage and edit variables or processes on remote servers through the Internet using an authentication method. SSH gives us a way with which it is possible to authenticate a remote user, to be able to transfer elements from the client to the host and vice versa..

 

SSH encryption
The SSH protocol offers us different forms of encryption such as:

 

  • Symmetric encryption
  • Asymmetric encryption
  • Hashing

 

 

SSH syntax
The basic syntax of SSH is as follows:
 ssh {user} @ {host} 

 

 

SSH operation
The mechanism for using SSH is simple, firstly, it tells Ubuntu that we will use a secure shell connection and with the encryption mechanisms (ssh), then we enter the user (user) with which we are going to authenticate and finally we set the destination (host).

 

Remember that when we use SSH, everything we do in the session (user authentication, commands, file transfers) will always be encrypted in order to protect data from any attack on the network.

 

With SSH it is possible to make use of SSH keys with which we can automate access to remote servers and computers, optimizing security..

 

Without further ado, let's see how to install SSH in Ubuntu 20.04.

 

To stay up to date, remember to subscribe to our YouTube channel!   SUBSCRIBE

 

 

Install SSH protocol in Ubuntu 20.04

 

Step 1

By default, basic SSH is already installed on the system, but with some restrictions, in the Ubuntu 20.04 terminal we execute the following:
 Ssh 
Step 2

As a result we will see all the options for using the SSH protocol:

 

 

 

image

 

 

Step 3

To check its use, we are going to try to establish a local connection, we execute the following:
 ssh localhost 
image

 

 

Step 4

As we can see, by default port 22 (of SSH) rejects the connection, in this case we must install the protocol of the SSH server with the following command:
 sudo apt-get install openssh-server 
image

 

 

Step 5

We confirm the installation with the letter S:

 

image

 

 

Step 6

We can check the status of the SSH service in Ubuntu 20.04 with the following command:
 sudo service ssh status 
image

 

 

Step 7

As we can see, its status is active and running, we can check access to the local host again:
 ssh localhost 
image

 

 

Step 8

If we do not accept the connection, an error will appear, so when executing the command it is required to enter "yes" to access with SSH.

 

After this we can access the SSH configuration file with an editor: There we can see the default SSH port (22), we can edit it if necessary, but we always recommend leaving the default values..

 sudo nano / etc / ssh / sshd_config 
image

 

With these simple steps we have installed SSH in Ubuntu 20.04.

 


by (1.9m points)

Related questions

+5 votes
1 answer
asked Oct 6 in Linux/Unix by backtothefuture (313k points) | 109 views
+4 votes
1 answer
asked Sep 29 in Linux/Unix by backtothefuture (313k points) | 85 views
+3 votes
1 answer
asked Sep 28 in Linux/Unix by backtothefuture (313k points) | 88 views
+5 votes
1 answer
asked Sep 28 in Linux/Unix by backtothefuture (313k points) | 174 views
+4 votes
1 answer
asked Sep 25 in Linux/Unix by backtothefuture (313k points) | 87 views
Please leave a comment about whether the solution works or not (with device model)   [X]Close
5,982 questions
6,072 answers
183 comments
2 users