The objective is to install SSH Server on Ubuntu 18.04 Bionic Beaver Linux
Operating System and Software Versions
Operating System: - Ubuntu 18.04 Bionic Beaver
Privileged access to your Ubuntu system will be required to perform this installation.
# - requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ - requires given linux commands to be executed as a regular non-privileged user
This guide will use tasksel to install SSH server. If tasksel is not available on your system you can install it by using the following linux command:
$ sudo apt install tasksel
Install SSH Server
Next, use tasksel to install the openssh-servertask:
$ sudo tasksel install openssh-server
SSH server is now active and will start after reboot:
$ service ssh status
● ssh.service - OpenBSD Secure Shell server
Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2018-01-15 11:59:54 AEDT; 20min ago
Process: 707 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)
Main PID: 714 (sshd)
Tasks: 1 (limit: 4915)
└─714 /usr/sbin/sshd -D
Jan 15 11:59:54 ubuntu systemd: Starting OpenBSD Secure Shell server...
Jan 15 11:59:54 ubuntu sshd: Server listening on 0.0.0.0 port 22.
Jan 15 11:59:54 ubuntu sshd: Server listening on :: port 22.
Jan 15 11:59:54 ubuntu systemd: Started OpenBSD Secure Shell server.
Jan 15 12:00:18 ubuntu sshd: Accepted publickey for linuxconfig from 10.1.1.230 port 36076 ssh2: RSA SHA256:NRnW+1Zxjt+TOoWsV//nzqkJo/cbg48/XOr3XDNMqYQ
Jan 15 12:00:18 ubuntu sshd: pam_unix(sshd:session): session opened for user linuxconfig by (uid=0)
SUBSCRIBE TO NEWSLETTER Subscribe to Linux Career NEWSLETTER and receive latest Linux news, jobs, career advice and tutorials.
To stop SSH server execute:
$ sudo service ssh stop
To start SSH server execute:
$ sudo service ssh start
To restart SSH server execute:
$ sudo service ssh restart
To disable SSH server to start during boot execute:
$ sudo systemctl disable ssh
To enable SSH server to start during boot execute:
$ sudo systemctl enable ssh
ARE YOU LOOKING FOR A LINUX JOB? Submit your RESUME, create a JOB ALERT or subscribe to RSS feed on LinuxCareers.com.
LINUX CAREER NEWSLETTER Subscribe to NEWSLETTER and receive latest news, jobs, career advice and tutorials.
DO YOU NEED ADDITIONAL HELP? Get extra help by visiting our LINUX FORUM or simply use comments below.