How To Install openssh-server on Ubuntu 20.04

In this tutorial we learn how to install openssh-server on Ubuntu 20.04. openssh-server is secure shell (SSH) server, for secure access from remote machines secure shell (SSH) server, for secure access from remote machines

Introduction

In this tutorial we learn how to install openssh-server on Ubuntu 20.04.

What is openssh-server

openssh-server is:

This is the portable version of OpenSSH, a free implementation of the Secure Shell protocol as specified by the IETF secsh working group.

Ssh (Secure Shell) is a program for logging into a remote machine and for executing commands on a remote machine. It provides secure encrypted communications between two untrusted hosts over an insecure network. X11 connections and arbitrary TCP/IP ports can also be forwarded over the secure channel. It can be used to provide applications with a secure communication channel.

This package provides the sshd server.

In some countries it may be illegal to use any encryption at all without a special permit.

sshd replaces the insecure rshd program, which is obsolete for most purposes. Task: cloud-image, openssh-server, ubuntu-core

Package: openssh-server Architecture: amd64 Version: 1:8.2p1-4 Multi-Arch: foreign Priority: optional Section: net Source: openssh Origin: Ubuntu Maintainer: Ubuntu Developers [email protected] Original-Maintainer: Debian OpenSSH Maintainers [email protected] Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 1491 Provides: ssh-server Depends: adduser (>= 3.9), dpkg (>= 1.9.0), libpam-modules (>= 0.72-9), libpam-runtime (>= 0.76-14), lsb-base (>= 4.1+Debian3), openssh-client (= 1:8.2p1-4), openssh-sftp-server, procps, ucf (>= 0.28), debconf (>= 0.5) | debconf-2.0, libaudit1 (>= 1:2.2.1), libc6 (>= 2.26), libcom-err2 (>= 1.43.9), libgssapi-krb5-2 (>= 1.17), libkrb5-3 (>= 1.13~alpha1+dfsg), libpam0g (>= 0.99.7.1), libselinux1 (>= 1.32), libssl1.1 (>= 1.1.1), libsystemd0, libwrap0 (>= 7.6-4~), zlib1g (>= 1:1.1.4) Recommends: default-logind | logind | libpam-systemd, ncurses-term, xauth, ssh-import-id Suggests: molly-guard, monkeysphere, ssh-askpass, ufw Conflicts: sftp, ssh-socks, ssh2 Replaces: openssh-client (« 1:7.9p1-8), ssh, ssh-krb5 Filename: pool/main/o/openssh/openssh-server_8.2p1-4_amd64.deb Size: 376932 MD5sum: 132fbd7dd7db8d767788c2ef41c72ea6 SHA1: c6aebb395e656aaf54931cc1bcb6821eeb2b9873 SHA256: bdbe3a79ee6430e8f3899c0a159535abe3d0e54365f70afdc547cd00a574634b Homepage: http://www.openssh.com/ Description-en: secure shell (SSH) server, for secure access from remote machines This is the portable version of OpenSSH, a free implementation of the Secure Shell protocol as specified by the IETF secsh working group.

Ssh (Secure Shell) is a program for logging into a remote machine and for executing commands on a remote machine. It provides secure encrypted communications between two untrusted hosts over an insecure network. X11 connections and arbitrary TCP/IP ports can also be forwarded over the secure channel. It can be used to provide applications with a secure communication channel.

This package provides the sshd server.

In some countries it may be illegal to use any encryption at all without a special permit.

sshd replaces the insecure rshd program, which is obsolete for most purposes. Task: cloud-image, openssh-server, ubuntu-core

There are three methods to install openssh-server on Ubuntu 20.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install openssh-server Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install openssh-server using apt-get by running the following command:

sudo apt-get -y install openssh-server

Install openssh-server Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install openssh-server using apt by running the following command:

sudo apt -y install openssh-server

Install openssh-server Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install openssh-server using aptitude by running the following command:

sudo aptitude -y install openssh-server

How To Uninstall openssh-server on Ubuntu 20.04

To uninstall only the openssh-server package we can use the following command:

sudo apt-get remove openssh-server

Uninstall openssh-server And Its Dependencies

To uninstall openssh-server and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:

sudo apt-get -y autoremove openssh-server

Remove openssh-server Configurations and Data

To remove openssh-server configuration and data from Ubuntu 20.04 we can use the following command:

sudo apt-get -y purge openssh-server

Remove openssh-server configuration, data, and all of its dependencies

We can use the following command to remove openssh-server configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge openssh-server

References

Summary

In this tutorial we learn how to install openssh-server package on Ubuntu 20.04 using different package management tools: apt, apt-get and aptitude.