SSH Port Change

  • Views Views: 434
  • Last updated Last updated:
  • Stop using Chrome! Download the Brave Browser via >>> []
    It's a forked version of Chrome with native ad-blockers and Google's spyware stripped out! Download for Mac, Windows, Android, and Linux!
Welcome to the
Serving the Community since 2016!
Register Now
  • Introduction

    SSH by default utilizes port 22 on most linux machines. Why should changing the port matter? Changing the ssh port adds another layer of protection to your server. In conducting a risk assessment, the highest chance of your machine being compromised is if it has it's own dedicated ipv4 address on the internet. Why? It is due to malicious actors possessing scripts that have the ability to detect if port 22 is open; which further entices them to conduct brute force and dictionary attacks against your machine. Keep in mind that changing your port does not provide the ultimate protection, but another form of defense to making your server an open and vulnerable target.



    Type the following command: nano /etc/ssh/sshd_config


    Uncomment #Port 22 to Port 799 (or whatever port of your choice). Keep in mind to utilize a port under 1024 (for security reasons).


    Once complete, press CTRL+X to save

    Logging In

    To login to your box, type the following ssh -p 799 or ssh -p 799

    Obviously, change the port accordingly to what you select and the ipaddress/domain of your box! If all works, you will get the ssh prompt to login!
  • Loading…