How to Configure SSH for Secure Remote Access


 Introduction


SSH (Secure Shell) allows you to securely connect to remote Linux systems. Proper configuration improves both security and usability.


Step 1: Install SSH


sudo apt install openssh-server # Debian/Ubuntu  

sudo yum install openssh-server # CentOS/RHEL


➡️ Installs the SSH service.


Step 2: Start and Enable SSH


sudo systemctl start ssh  

sudo systemctl enable ssh


➡️ Starts the SSH service and enables it at boot.


Step 3: Configure SSH Settings


Edit /etc/ssh/sshd_config and set:


PermitRootLogin no

PasswordAuthentication yes


➡️ Disables root login for security.


Step 4: Restart SSH


sudo systemctl restart ssh


Conclusion

By configuring SSH securely, you ensure safe remote access to your Linux servers.

Comments