Home > Ask the Enterprise Linux Experts > Security Questions & Answers > Setting up SSH for remote, secure server access
Ask The Enterprise Linux Expert: Questions & Answers
EMAIL THIS

Setting up SSH for remote, secure server access

James Turnbull EXPERT RESPONSE FROM: James Turnbull

Pose a Question
Other Enterprise Linux Categories
Meet all Enterprise Linux Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 01 July 2007
Can you offer some tips for setting up an SSH service so I can get secure, remote access to my server?

>

It would help to know on what platform you'd like to set up SSH on, but I can provide some general tips.

  • Use only SSH V2 -- V1 is vulnerable to compromise. On Linux, this is usually done by default and managed in your /etc/ssh/sshd_config file by the Protocols option.
  • Don't allow root or Administrators to log in directly. Only normal users should be allowed to log in and then if required they can escalate their privileges by using su or sudo. On Linux this is controlled, again in the sshd_config file, by the PermitRootLogin option.
  • Ensure you use suitable authentication, for example passwords or keys.
  • Try to avoid using port 22 for your SSH connections. Automated brute force attack tools are commonly used by attackers to scan port 22 and try to brute usernames and passwords. Changing the port to something else, for example 2222, is a quick and simple way of reducing this risk. Alternatively, if you must use port 22, you can use tools like BlockSSHD (Note: I am the author of this tool) or Fail2Ban to block excessive or inappropriate login attempts.
  • Ensure you have configured suitable logging of your SSH daemon and that you review your logs for illicit login attempts. Ttools like Swatch and SEC can assist with this.
  • Only bind SSH to the addresses required. If you have multiple interfaces in your host, for example an interface on your internal network and another on an external network such as the Internet, then only bind the daemon to the interface through which you need to connect. This is controlled on Linux using the ListenAddress option.
I hope that helps.


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Security
Solaris 10 Trusted Extensions vs. SELinux
Spamassassin and dspam on Postfix
Bastille or SELinux?
Snort Log retention
Hardening Linux servers for remote access
Using YUM to upgrade a system around the kernel
Setting up SSH on a Windows server
Configuring iptables
Integrating Nagios with Netcool
SELinux on other distros (not just Red Hat)

Linux server and network security issues and threats
One million Linux kernels booted by Sandia researchers using virtualization and HPC
Using nmap for Linux administration and security
A look at real-world exploits of Linux security vulnerabilities
Using OpenSSH for secure network tunnels on Linux
Red Hat Enterprise Linux 5.3 released
Open source growth dims LAMP stack to symbolic status
Automated tool at LinuxWorld reduces security risk
LinuxWorld preview: IBM engineer touts SELinux
Canonical beefs up Ubuntu with new server, desktop version
Linux security guide: Linux, open source security tools and tips

Securing Linux best practices
Hardening Linux with Bastille UNIX
Security essentials for Active Directory on Linux
A look at real-world exploits of Linux security vulnerabilities
Five common Linux security vulnerabilities you may be overlooking
For Linux security, principle of least privilege prevails, says Red Hat security expert
Hardening SUSE Linux Enterprise Server in eight steps
Reducing Windows desktop total cost of ownership
Linux security guide: Linux, open source security tools and tips
Red Hat Enterprise Linux 5, JBoss to receive security boost
How to use SSH Public/Private keys in PuTTY

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



Linux Migration Advice: Unix-to-Linux, Windows-to-Linux
HomeNewsTopicsITKnowledge ExchangeTipsBlogsAsk the ExpertsMultimediaWhite PapersIT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2003 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts