Install Openssh Server Ubuntu 20.04



  • Right after updating your system’s APT package repository, install the OpenSSH server on your Ubuntu machine by typing the command provided below. $ sudo apt install openssh-server openssh-client Type “Y” and hit “Enter” to grant permission for taking additional disk.
  • Basic installation. This chapter provides an overview of installing Ubuntu 20.04 Server Edition. There is more detailed documentation on other installer topics. Preparing to Install. This section explains various aspects to consider before starting the installation.

A) You need to have a running Ubuntu 20.04 Server. B) You should have apt tool. Download openssh-server8.2p1-4amd64.deb for 20.04 LTS from Ubuntu Main repository. You need to stop the ssh service before un-installing it. Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below: sudo /etc/init.d/ssh stop. Sudo service ssh stop Then do. Sudo apt-get -purge remove openssh-client openssh-server.

SSH (Secure Shell) is an encrypted protocol which allows connections between client system and a servers. You can connect to your system remotely, perform administrative tasks and access files. Also, you can transfer files securely via scp and sftp. In this tutorial we will show you how to enable SSH on an Ubuntu 20.04 system.

Enabling SSH on Ubuntu#

Ubuntu 20.04 enable ssh

If you have installed fresh Ubuntu, remote access via SSH is denied. You have to enable it for remote access. It is very easy with simple steps.

Ubuntu

To install and enable SSH on your Ubuntu system, follow the below steps as root or user with sudo privileges:

1. First update the package index list and install the openssh-server package:

It will prompt you to enter password, enter your password and hit Enter to continue to installation.

2. SSH service will start automatically, once the installation is finished. Verify SSH Service by checking status:

You should get output as following:

You can quit by pressing q to the command prompt.

3. If you system is secured with firewall then you should allow SSH port.

Sshd

At this point SSH is installed and you can connect to your Ubuntu system via SSH from any remote system. By default, Linux and macOS systems have SSH clients pre-installed. You can connect from a Windows machine by using an SSH client such as PuTTY.

Connecting to the SSH Server#

To connect to your Ubuntu machine over network you can use the ssh command followed by the username and the IP address as following:

Here, you should replace with your real username and ip address of the remote host.

For example, username is tecnstuff and ip address is 53.168.3.125 then you should run command as below:

Openssh

It will show a message when you connecting first time:

Type yes and you will be asked to enter password:

On success, it will show default Ubuntu welcome message:

This means you are now connected to remote system.

Disabling SSH on Ubuntu#

If you would like to disable the SSH server on your Ubuntu system, just stop the SSH service by typing:

Again, to re-enable it, type:

Conclusion#

Server

Openssh Linux

This tutorial shown how to install and enable SSH on your Ubuntu 20.04 system. Now you can make remote session from your any client machine and do further admin tasks.

Ubuntu Install Openssh

You can improve your remote machine security by changing the default SSH port, which will reduce the risk of automated attacks. To know more about SSH server read the official SSH manual page.

If you have any questions or feedback, please leave a comment below.

Install Openssh Ubuntu 20.04

If our content helps you, please consider buying us a coffee

Install Openssh Ubuntu 20

Thank you for your support.