Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/feed-rss2.php on line 8
Changing the Default SSH Port (Linux / Ubuntu / Debian) – AKLWEB HOST LLC Support Center https://support.aklwebhost.com Tue, 26 Nov 2019 08:40:09 +0000 en-US hourly 1 https://wordpress.org/?v=6.4.4 Changing the Default SSH Port (Linux / Ubuntu / Debian) https://support.aklwebhost.com/knowledgebase/changing-the-default-ssh-port-linux-ubuntu-debian/ https://support.aklwebhost.com/knowledgebase/changing-the-default-ssh-port-linux-ubuntu-debian/#respond Tue, 26 Nov 2019 08:39:58 +0000 https://support.aklwebhost.com/?post_type=manual_kb&p=2364 SSH is one of the most commonly attacked services as it provides easy access to full control of a dedicated server. Changing the default SSH port will help prevent an attacker from launching brute force attacks to the default port.

1. Login as the server as root (or gain root access by executing ‘sudo su’)

2. Check to see the status of the firewall by executing ‘ufw status’
If the firewall is active then we need to add a rule to allow connections for our new SSH port.
This can be done by executing ‘ufw allow newportnumberhere/tcp’

3. Execute ‘nano /etc/ssh/sshd_config’ and look for the line that contains ‘Port 22’

4. Change the number ’22’ to any unused port you’d like

Save and exit by holding down ‘ctrl’ and ‘x’

5. Restart the SSH service by executing ‘restart ssh’ within the command line

For Debian, execute ‘service ssh restart’

6. If you can still access the command line, type ‘ss -tnlp | grep ssh’ to verify SSH is listening on the new port. (optional)

7. Start a new SSH session on the new port.

8. Delete the old firewall rule for the old port by executing ‘ufw delete allow 22/tcp’

]]>
https://support.aklwebhost.com/knowledgebase/changing-the-default-ssh-port-linux-ubuntu-debian/feed/ 0