The following article will explain how to install and start SSH service on RHEL 8 / CentOS 8 system. SSH is a client-server service providing secure encrypted connections over the network connection.

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.
Active SSH service and firewall SSH port 22 open on RHEL 8
Active SSH service and firewall SSH port 22 open on RHEL 8.

Software Requirements and Conventions Used

Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System RHEL 8 / CentOS 8
Software N/A
Other Privileged access to your Linux system as root or via the sudo command.
Conventions # - 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

Redhat 8 enable ssh service step by step instructions



  1. Install the openssh package:
    # dnf install openssh-server
    

  2. SUBSCRIBE TO NEWSLETTER
    Subscribe to Linux Career NEWSLETTER and receive latest Linux news, jobs, career advice and tutorials.


  3. Start the OpenSSH service by executing the following command:
    # systemctl start sshd
    
  4. Check the status of the sshd service.
    # 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
    
  5. Enable the SSH service to start after the reboot:
    # systemctl enable sshd
    
  6. Open the firewall rules to accept incoming traffic on SSH port 22:
    # firewall-cmd --zone=public --permanent --add-service=ssh
    
  7. Connect to the SSH server with IP eg. 10.1.1.1 as the root user from a remote client machine:
    $ ssh root@10.1.1.1
    
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.