Change default SSH port

Bookmark on del.icio.us

By default, SSH runs on port 22. This leads to thousands of automatic scans and scripted attacks being launched.

No reason not to change your port exists to the best of my knowledge. Get it changed!

Add a line in the file /etc/ssh/sshd_config:

Port 6969

Reload sshd

#/etc/rc.d/sshd reload
OR
service sshd restart

A couple of simple things here will ensure you of success:

  • Check that whichever port you choose is not already in use
  • After restarting ssh, do not close that window. Instead, open a new connection leaving the existing connection open. If anything has gone wrong and you wish to revert your changes back, you can do so in your existing window.
Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • bodytext
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Technorati

Technorati Tags: , , ,

One Response to “Change default SSH port”

  1. Adding SSH welcome and warning messages | Hungerford Web Design Blog WordPress 2.2.1 Says:

    [...] Security and Standards for the Hungerford area « IE8 - back to the drawing board Change default SSH port [...]

Leave a Reply

You must be logged in to post a comment.