How to secure your SSH Connection on CentOS,Fedora, RHEL
If you are using VPS server or need remote access to a machine we will probably use SSH (Secure Shell) connection. Use modern cryptography methods for privacy and protect from an unsecured, unsafe network. The basic SSH secure to do few updates.
Install SSH :
Once installed that package, start and enable on boot,
Change Port Number and Allow User :
By default SSH connection port number pointing to 2., Open ssh configure file, change port number, disable direct root login permission and Allow specific Users.
For example, Create a new user BksIhSHLOG,
Changing password for user BksIhSHLOG.
Retype new password:
passwd: all authentication tokens updated successfully.
Change User permission,
Update in sshd_config file,
Once you have done all the changes need to restart sshd.
Stopping sshd: [ OK ]
Starting sshd: [ OK ]