How to install and setup the SSH server on Fedora 26

By default the SSH server should already be installed and available on Fedora 26. We will first check if the SSH server is installed. If it is installed we will activate it else we will install then activate it.

Use root user

su

Check if the SSH server is installed

service sshd status

If you get sshd service not found then the ssh server is not installed. Please seeHow to install the SSH server?” section below on this page. If you get the following output then the SSH server is installed but not started

How to install and setup the ssh server on Fedora 26

Start the SSH server service

service sshd start

Enable starting the SSH server on boot

systemctl enable sshd.service

Your SSH server is up and running and by default the SSH server runs on port 22.

 

How to install the SSH server?

If you don’t have the SSH server installed then

Install the openssh-server

dnf install -y openssh-server

Once installed continue from the check if the SSH server is installed above.

Other useful commands

The following commands may be required or useful to know

Stop the SSH server service

systemctl stop sshd.service

Disable starting the SSH server on boot

systemctl disable sshd.service