Create account Login Webmail Contact Us

Secure the Secure Shell (SSH)
Posted by admin on 17 September 2009 11:35 PM
Secure the Secure Shell
By default SSH will give root and any local user secure access to the server. For security reasons it is a good idea to change this setting and specify the users which are allowed to have SSH access. The configuration file for SSH is called sshd_config and is either in /etc or /etc/ssh

Login to the server and on the command prompt do:

[[email protected] root]# vi /etc/ssh/sshd_config

things to change:

#don't allow root to SSH in to the server:
PermitRootLogin no

#users allowed to login:
AllowUsers user1 user2 user3

Now do a "shift zz" (hold down the shift key and tab 2 times the z key)
The configuration file now is saved and closed and you have to restart ssh:
[[email protected] root]# /etc/init.d/sshd restart
Stopping sshd: [ OK ]
Starting sshd: [ OK ]
[[email protected] root]#

Now you can SSH to your server with your username,then do a su on the command prompt and type in the root password to become root.
(595 vote(s))
Not helpful

Comments (0)
Post a new comment
Full Name: