This site utilizes JavaScript to function correctly. Looks like it's disabled on your browser. Please enable it for your best experience.

For instructions on enabling JavaScript, click here

Skip to main content

Just Host Web Hosting Help

Changing the SSH Port

You can find the SSH configuration file at /etc/ssh/sshd_config

To edit this file, you will need to log into your server through shell as the root user.

To change specific parameters within sshd_config, you need to uncomment the line by removing the number-sign (#) and changing the value for the line. For example, the default SSH port appears in a line like this:

#Port 22

To change the SSH port to 456, you will need to make the line appear like this:

Port 456

After you are finished configuring SSH, you will need to restart the SSH daemon. You can do so by issuing the following command:

/etc/init.d/sshd restart

After you restart SSH, you will need to log out of your server and log in again using the proper user, IP address, and port number you specified in sshd_config.

Knowledgebase Article 93,577 views bookmark tags: shell


Was this resource helpful?

Did this resolve your issue?


Please add any other comments or suggestions about this content:





Recommended Help Content

This article will explain how to change or reset the password for a MySQL user.
Knowledgebase Article 155,304 views tags: change mysql password reset user

How can I change the outgoing SMTP port from 25 to 26?
Knowledgebase Article 596,967 views tags: email outgoing port send sending smtp

I need to be able to change the port used by Eudora for incoming or outgoing mail.
Knowledgebase Article 195,867 views tags: eudora port ports

Related Help Content

Is SSH/Shell access enabled by default?
Knowledgebase Article 873,788 views tags: bash command line secure shell ssh

Explanation of the cause of the warning and how to remove it.
Knowledgebase Article 92,177 views tags: reseller root

What is the difference between a Shared & Dedicated IP? How do I get Port Access? What type of SSL Certificate is right for me?
Knowledgebase Article 499,049 views tags: ip port secure

How to change the name of your WordPress site without WP Tools
Knowledgebase Article 247,710 views tags: change domain update wordpress

How to modify the Exim Port (Mail Transfer Agent) in the WHM
Knowledgebase Article 127,948 views tags: dedicated exim outgoing port sending server whm

How to enable/turn on SSH access for Resold accounts
Knowledgebase Article 106,323 views tags: reseller resold shell ssh whm

How to change the password for a Resold account.
Knowledgebase Article 113,096 views tags: change password reseller resold update

How can I gain access to blocked ports? What port numbers can be opened?
Knowledgebase Article 190,035 views tags: access firewall outgoing port restrictions

** Google ad credits are only available to customers in the United States, Canada, and the United Kingdom at this time.

¹ VAT (Value Added Tax) is not included in our advertised price and will be charged separately and itemized on invoices and billing information. Standard VAT rates based on EU Member State regulations may apply. Learn more.