Although in Fedora 30, 29, 28 and also in an earlier version, by default the open-ssh server installed on the system. However, in case you don’t have the SSH server then here is a tutorial on it. Here we let you know the commands for the terminal to install Open SSH server on Fedora along with the way to enable and restart its services.
Fedora patron by the Redhat and developed by the Fedora Project foundation. It is open source and supports both YUM and DNF to install different packages.
Note: If you don’ have SSh server on Fedora and you try to connect it with a remote computer using port 22 then you will get error i.e ssh: connect to host IP address port 22: Connection refused.
Step 1: Install SSH server on Fedora using a command
So, to remove the error of fedora i.e ssh connection refused, we have to first install the OpenSSH server on our Fedora desktop. There are two ways to install SSH on Fedora 30, 29, 28 or previous version i.e using YUM or DNF. We will show both the usage of both the commands:
sudo yum install openssh-server
sudo dnf install openssh-server
Step 2: Enable ssh in Fedora
Once the installation is completed, the second step is to enable the SSH in Fedora, so that it automatically get started every time.
systemctl enable sshd
Step 3: Starting ssh service on Fedora
Finally, run the command to start SSH service on your operating system, thus you can connect it from some remote system.
systemctl start sshd
Check the port 22 is opened successfully
Now use the below command to see that the SSH default port 22 has been opened successfully and listening to all IP addresses…
netstat -ant | grep 22
The result of the above command will look like below
Step 4: Connect from Remote system
To connect to SSH installed Fedora Linux from Windows or Linux just open a command terminal and use the below command. In Windows, use the Command prompt.
ssh@[username][yourserevr IP address]:22
For example to log in as root:
In this way, we can simply install, enable and start the services of OpenSSH server on Fedora Linux using command terminal…
Also see, a simple way to get Fedora Remix on WSL for Windows 10…