How to Install SSH Server on Linux?
In order to make a remote connection with SSH to your computer where the Linux operating system is installed, you need to have the SSH Server
computer installed or you need to install it. In general, SSH Server
is already installed, but it is not available on some distributors or the service does not start on its own. This is how we set up the ssh server and start the system how it works automatically, we will see now.
1. SSH Server Setup
First, open the Linux terminal and enter the following commands in order.
1 2 | sudo apt-get update sudo apt-get install openssh-server |
If we get a warning like the following.
openssh-server is already the newest version.
We already have SSH Server
installed it. If it is not installed, you may need to press ‘y’ to install.
After the installation process, we check the service list.
2. Service Control and Startup
In order to check all services, we check with the following command.
1 | sudo service --status-all |
Here, [-] means closed and [+] means active.
If we just want to see the status of the SSH Server
1 | sudo service ssh status |
If you type, you can see the service status in detail.
If the service has not started yet
1 | sudo service ssh start |
you can start the service with the above command.
3. To Start Service Automatically
Now you can also last and automatically start the optional SSH Server
service.
1 | sudo update-rc.d ssh enable |
run the above command. After rebooting, you can check the service status as shown in step 2.
I hope it has been a useful article.