cPanel Config

Welcome to cPanelConfig the fastest growing cPanel configuration and troubleshooting guide on the internet. Please take the time and register. We would love to have your contribution to this completely free cPanel resource. We are updating this daily so be sure to visit us on a regular basis.

Secure ssh access

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Posted by yolau


Securing ssh access is extremely vital for any server. There are a few things that you can do to secure it. This article will cover one the basics.

  1. The first this that I recommend doing is changing the ssh port. This will prevent a lot of login attempts from automatic scripts trying port 22. To do this edit the file /etc/ssh/sshd_config
  2. pico /etc/ssh/sshd_config

    Locate the line #Port 22, uncomment it and change the port to something random.
    Note: Please remember to open this port in your firewall if you use one. Failure to do so may lock you out if your own server !

  3. Allow only SSH 2 protocol
  4. Again edit /etc/ssh/sshd_config, locate the line #Protocol 2,1 and change it to Protocol 2

    After doing step 1 and 2 you have to restart sshd for the changes to take effect.

    service sshd restart

Share this: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • bodytext
  • del.icio.us
  • Slashdot
  • StumbleUpon
  • Netvouz
  • description
  • ThisNext
  • MisterWong
  • Wists
  • De.lirio.us
  • Furl
  • MyShare
  • Smarking
  • Technorati
  • YahooMyWeb

If you enjoyed this post, make sure you subscribe to my RSS feed!

One Response to “Secure ssh access”

  1. [...] Restrict SSH Access [...]

Leave a Reply