Networking, Programming and Graphics Tutorials
Home >> OS >> Linux >> SSH >>

How to change the port of my SSH connection [1/2]

Type: Code Networking, Programming and Graphics Tutorials
How to change the port of my SSH connection
Level: Intermediate Networking, Programming and Graphics Tutorials Networking, Programming and Graphics Tutorials 
How to change the port of my SSH connection
Date: 2007-Mar-15
How to change the port of my SSH connection
Visited: 2606 times
How to change the port of my SSH connection
Rating: How to change the port of my SSH connection
How to change the port of my SSH connection
Author: Tony Potter

This tutorial will show you how you can change the port of your SSH connection. This will help you to avoid automated brute-force attacks to your server. To make this change we are going to change that editing the settings in 'sshd_config' file.

Most of the attacks are made by bots, not from a real person and they are targeted to the default services ports. When you change the port the shh service won't be attacked by artificial scripts, as it takes to much time the whole ports diapason to be checked.

The tutorial is written for Red Hat Linux like operating systems – Fedora, CentOS etc.

Connect to your server with SSH client . Switch to root and type:

vi /etc/ssh/sshd_config
and you will see the file opened into VIM editor.
The reason why we use VIM is because it is installed on almost all Unix/Linux based operating systems.
To find the port option type:
'Esc' key then ':' and '?Port' and using the 'n' key locate this string:

Port 22

This is the default port number for your SSH.

Networking, Programming and Graphics Tutorials - How to change the port of my SSH connection [1/2] - Networking, Programming and Graphics Tutorials

Need a specific tutorial? Do not hesitate and submit a request!
Related Tags: change remote connection port  change rdp connection port win2003  "mysql connection port change"  how to change RDP connection Port number in window  change remote connection port number  change port remote desktop connection  XP change Remote desktop connection port  change connection port remote desktop  how to change port in remote desktop connection  how to change remote desktop connection port  change remote desktop connection port  how to change the remote desktop connection port  change port of remote desktop connection  win 2003 how to change remote connection port  remote desktop connection port change  remote desktop connection port number change  how to change remote connection port windows 2003  win2003 remote desktop connection port change  change port Windows Remote Desktop Connection  change remote desktop connection port for windows