Enable ssh server on Oracle Linux 8.x

Puneeth Prakash
1 min readSep 28, 2023

--

A default Oracle Linux 8.x installation includes the openssh and openssh-server packages, but the sshd service isn’t enabled by default.

Run the following command to install the openssh package (if not installed):

sudo dnf install openssh openssh-server

Start and enable the sshd service :

sudo systemctl start sshd
sudo systemctl enable sshd

In Oracle Linux 8, the default firewall utility is the firewall-cmd, which is provided by the firewalld package.

You can use the --add-port option to allow access to specific ports, like 22/sctp in this case for ssh access.

firewall-cmd -permanent --add-port=22/sctp

Similarly, the --remove-port option removes access to a port. Remember to use the -permanent option to make the change persist.

NOTE:

To secure OpenSSH configuration against the most common remote exploits:

  • Disable remote root user logins over SSH.
  • After you have correctly configured key based authentication, Disable SSH password authentication.
  • Consider setting a non standard SSH port for Internet-facing systems.

Refer to the following Doc for more information on the same:

--

--

Puneeth Prakash

I work as a Subject Matter Expert in FMW at Oracle. This blogging space is to share my learning experiences. Views expressed here are solely my own.