CentOS SSH Setup: Enable Service in 3 Steps
To enable SSH service on CentOS, you need to execute the following steps in the terminal.
- Install SSH server: If your system does not have an SSH server installed, you can use the following command to install OpenSSH server.
sudo yum install openssh-server
- Start the SSH service by using the following command:
sudo systemctl start sshd
- Enable SSH service start at system boot: Use the following command to configure SSH service to automatically start during system boot:
sudo systemctl enable sshd
- To verify if the SSH service has been started: you can use the following command to check the status of the SSH service:
sudo systemctl status sshd
If SSH service is running properly, it will display an Active (running) status.
The SSH service has now been successfully started in CentOS, allowing you to connect to the CentOS server using an SSH client.