Results 1 to 1 of 1
-
15th Jun 2014, 02:12 PM #1
How to Change the SSH Port on Dedicated and VPS
You can find the SSH configuration file at /etc/ssh/sshd_config
Note: Upon updating SSH ports, be sure to add the port number to the firewall; otherwise, users will be locked out of the server.
Change Specific Parameters within sshd_config
To change specific parameters within sshd_config:
- Log into your server as the root user.
- Uncomment the desired 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
Update IPTables and Firewall
After you are finished configuring SSH, you will need to add the port to iptables as well as your installed firewall.
To update iptables, please enter the following in SSH:
Code:iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 456 -j ACCEPT
Reset SSH Daemon
After making the necessary changes to iptables and your computer's firewall, you will need to restart the SSH daemon. You can do so by issuing the following command:
Code:/etc/init.d/sshd restart
Areon Reviewed by Areon on . How to Change the SSH Port on Dedicated and VPS You can find the SSH configuration file at /etc/ssh/sshd_config Note: Upon updating SSH ports, be sure to add the port number to the firewall; otherwise, users will be locked out of the server. Change Specific Parameters within sshd_config To change specific parameters within sshd_config: Log into your server as the root user. Uncomment the desired line by removing the number-sign (#) and changing the value for the line. For example, the default SSH port appears in a line like Rating: 5
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
How to change the Main IP in a Dedicated Server?
By penlau in forum Server ManagementReplies: 7Last Post: 22nd Apr 2012, 02:06 PM -
how to change the language from UTF-8 to Windows-1252
By amerriaz in forum Web Application/Script SupportReplies: 9Last Post: 23rd Nov 2011, 01:42 PM -
How to change the URL with the Title Name of the post
By tamildragon in forum Webmaster DiscussionReplies: 1Last Post: 18th Dec 2010, 04:06 PM -
How to change the [CODE]??
By Foxy in forum vBulletinReplies: 8Last Post: 22nd May 2010, 04:12 AM -
How To Change The Ip As We Need..,
By SilEnt_KillEr in forum Tutorials and GuidesReplies: 14Last Post: 12th Jan 2009, 08:55 AM
themaCreator - create posts from...
Version 3.14 released. Open older version (or...