Web Hosting Forum | Lunarpages
News: July 14, 2008 - New Contest! - Submit Your WordPress Theme Designs, Win BIG!
August 25, 2008 - Time to Vote for the August 2008 Site of the Month!
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
August 29, 2008, 11:10:01 PM


Login with username, password and session length


Pages: [1]   Go Down
  Print  
Author Topic: Secure the Secure Shell (SSH)  (Read 3151 times)
PeterM
Spacescooter Operator
*****
Offline Offline

Posts: 36


« on: May 09, 2005, 12:27:58 AM »

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:

[root@office 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:
[root@office root]# /etc/init.d/sshd restart
Stopping sshd:                                             [  OK  ]
Starting sshd:                                              [  OK  ]
[root@office 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.
Logged
vlad.panainte
SysAdmin
Pong! (the videogame) Master
*****
Offline Offline

Posts: 20


« Reply #1 on: July 08, 2007, 11:20:46 PM »

Also you can secure your ssh changing default port(22)
Change the port that SSH listens for connections on:

      #Port 22
      Port XX    (where XX = your new portnumber)
You can choose something like 22202 or something you can remember

  You are now done editing the /etc/ssh/sshd_config file (save your changes, and quit your editor).
Another important thing dont forgot to allow the port you choose from firewall:
/etc/apf/conf.apf
and you add there your new ssh port
I hope this help
Thank you
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM