How To Setup Ssh Server Linux?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
1. Install the SSH server software:
On Ubuntu and Debian systems, use the following command:
sudo apt-get install openssh-server
On CentOS and Fedora systems, use the following command:
sudo yum install openssh-server
2. Configure the SSH server:
Open the SSH server configuration file in a text editor:
sudo nano /etc/ssh/sshd_config
Edit the configuration options as needed. For example, to disable root login, change the following line:
PermitRootLogin yes
To:
PermitRootLogin no
Save and close the file when you are finished.
3. Restart the SSH server:
sudo systemctl restart sshd
4. Test the SSH server:
From another machine on the same network, try connecting to the SSH server using the following command:
ssh username@server_ip_address
If everything is configured correctly, you should be able to log in with the appropriate credentials.