In this tutorial you will learn:
- How to Install SSH service.
- How to start SSH service.
- How to enable SSH to start after reboot.
- How to open SSH port 22 for incoming traffic.
Software Requirements and Conventions Used
|Category||Requirements, Conventions or Software Version Used|
|System||RHEL 8 / CentOS 8|
|Other||Privileged access to your Linux system as root or via the |
|Conventions|| # - requires given linux commands to be executed with root privileges either directly as a root user or by use of |
Redhat 8 enable ssh service step by step instructions
- Install the
# dnf install openssh-server
- Start the OpenSSH service by executing the following command:
# systemctl start sshd
- Check the status of the
# systemctl status sshd ● sshd.service - OpenSSH server daemon Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor preset: enabled) Active: active (running) since Fri 2018-11-16 22:08:39 EST; 1 day 21h ago Docs: man:sshd(8) man:sshd_config(5) Main PID: 979 (sshd) Tasks: 1 (limit: 24007) Memory: 6.6M
- Enable the SSH service to start after the reboot:
# systemctl enable sshd
- Open the firewall rules to accept incoming traffic on SSH port 22:
# firewall-cmd --zone=public --permanent --add-service=ssh
- Connect to the SSH server with IP eg. 10.1.1.1 as the
rootuser from a remote client machine:
$ ssh email@example.com