UK WEB HOSTING FORUM FOR DISCUSSION ON WEB HOSTING SERVICE AND SUPPORT
LINUX HOSTING WINDOWS HOSTING PACKAGES SHOPPING CART OSCOMMERCE ZEN CART AGORA
ECOMMERCE HOSTING ASP MSSQL FRONTPAGE HOSTING PHP MYSQL HOSTING DISCUSSION FORUM
CPANEL RESELLER HOSTING DEDICATED SERVER VPS HOSTING PLESK VIRTUOZZO
Quick Search
Your forum announcement here!

  UK Web Hosting | Dedicated Server Windows and Linux VPS Forum > Technical Support > System Security

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 19-04-2008, 18:41
WelshTom's Avatar
Moderator
 
Join Date: May 2007
Location: Newport, Wales
Posts: 788
Send a message via AIM to WelshTom Send a message via MSN to WelshTom Send a message via Yahoo to WelshTom
Default Securing SSH

Securing SSH is vitally important. Here are a few simple steps which will help you secure SSH on your server.

The first thing you should do is change the port that SSH listens on. This will help prevent automated-hacking tools from trying to brute force their way into your server.

To do this, open your SSH client (Putty is recommended).

Login to your server.

At the command line, you need to go to /etc/ssh

To do this, type "cd /etc/ssh" and hit enter.

You then need to edit the SSH config file. To do this, type "vi sshd_config" at the command prompt.

You will then be presented with the SSH config, please be careful when editing this file - as if you break it, SSH can fail and you will not be able to access your server.

You need to look for the line which should look like the following:

Quote:
Port 22
To change the SSH port, simply hit the insert key on your keyboard, and change 22 to a port of your choice. Please make sure that you open the port in any firewall modules which you have installed, and that the port isn't already in use by some other application.

When you have changed the port number, simple hit escape on your keyboard, and then type ":wq" and hit enter. This will save the file and return you to the console.

When this is done, you'll need to restart SSH as follows:

"service sshd restart"

When I get a bit more time, I'll explain on how to disable Password Authentication, to make your server more secure.
__________________
Thomas Williams
Founder of TWR Web Design
http://www.twrwebdesign.co.uk/
Reply With Quote
  #2 (permalink)  
Old 20-04-2008, 04:24
Rock's Avatar
System Administrator
 
Join Date: Dec 2006
Posts: 576
Cool

Hey Tom

Here's a small one from me.. supporting/securing your views further...

Securing SSH (Secure Shell)
:

It's a protocol which supports logging into a remote system or executing commands on a remote system, using an encrypted communication between the two systems. Hence securing it; itself is a method of securing the server

By default SSH runs on version 1 and allows direct root access to the system. In order to secure the server steps should be taken to disable direct root access within the sshd_config file and any user should be forced to use only protocol 2. Protocol 2 is more secure than 1.

Here's a simple procedure on getting this done quickly:
Quote:
1) vi /etc/ssh/sshd_config
2) Change Protocol 2,1 to Protocol 2
4) PermitRootLogin yes = no
5) Restart SSHD: /etc/rc.d/init.d/sshd restart
Note: Please make a backup of any files you modify, incase you change anything unexpectedly, restoring the system to the original state becomes easier
__________________

Rock _a.k.a._ Jack L.

http://www.eUKhost.com
Windows Hosting || Windows Reseller Hosting
Reply With Quote
  #3 (permalink)  
Old 22-04-2008, 01:41
Rock's Avatar
System Administrator
 
Join Date: Dec 2006
Posts: 576
Arrow

Further more, SSH can be resource hogger/intensive for your server too if not setup properly, in other words, it can use up all of your resources making the server unusable or rather taking the complete system down .. -

You can limit/prevent such applications and scripts to stay within the limits by setting up the "Shell Resource Limits" for the users.
You can configure shell resource limits in /etc/security/limits.conf on most Linux systems..

Note: Please make a backup of any files you modify, in case you change anything unexpectedly, restoring the system to the original state becomes easier...
__________________

Rock _a.k.a._ Jack L.

http://www.eUKhost.com
Windows Hosting || Windows Reseller Hosting
Reply With Quote
  #4 (permalink)  
Old 12-06-2008, 21:35
Junior Member
 
Join Date: Jun 2008
Posts: 26
Default

Ouch, telling people to use vi is a dangerous move pico is more user firendly
Reply With Quote
  #5 (permalink)  
Old 12-06-2008, 21:58
WelshTom's Avatar
Moderator
 
Join Date: May 2007
Location: Newport, Wales
Posts: 788
Send a message via AIM to WelshTom Send a message via MSN to WelshTom Send a message via Yahoo to WelshTom
Default

Quote:
Originally Posted by Scothorse View Post
Ouch, telling people to use vi is a dangerous move pico is more user firendly
lol - SSH is a CLI - it's not designed to be user-friendly - nor the stuff which runs on it
__________________
Thomas Williams
Founder of TWR Web Design
http://www.twrwebdesign.co.uk/
Reply With Quote
  #6 (permalink)  
Old 13-06-2008, 02:48
Rock's Avatar
System Administrator
 
Join Date: Dec 2006
Posts: 576
Wink

Quote:
Originally Posted by WelshTom View Post
lol - SSH is a CLI - it's not designed to be user-friendly - nor the stuff which runs on it
Rightly said ! SSH isn't user friendly, but it's rather more powerful than the GUI mode..
My vote goes for SSH mode for sure.. It's been years I haven't touched GUI..
__________________

Rock _a.k.a._ Jack L.

http://www.eUKhost.com
Windows Hosting || Windows Reseller Hosting
Reply With Quote
  #7 (permalink)  
Old 13-06-2008, 13:56
eUKhost.com's Avatar
Chief Marketing Officer
 
Join Date: Sep 2005
Posts: 4,261
Send a message via AIM to eUKhost.com Send a message via MSN to eUKhost.com
Default

Quote:
Originally Posted by Scothorse View Post
Ouch, telling people to use vi is a dangerous move pico is more user firendly
yes

Pico is more user friendly and less memory intensive. I'm the only person in our company who uses pico as all other staff members prefer only vi.
__________________
UK Web Hosting || Business Hosting || eUKhost Knowledgebase
Toll Free : 0808 262 0255 || MSN : mark @ eukhost.com || AIM : eukmark
A bunch of Sheep led by a Lion is better than a bunch of Lions led by a Sheep.
__________________________________________________

Great Opportunity :: Join our Affiliate Program for FREE and earn 20% commission on each referral.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 08:18.

 

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by Web Hosting 3.1.0
Copyright © 2001-2008, eUKhost.com. All rights reserved.

 
Site Map

knowledgebase articles

popular blog categories