How to change Linux / Unix SSH Port

No GoodNeed ImprovementOKGoodExcellent (No Ratings Yet)
Loading ... Loading ...

To make your Linux server safer (to protect against SSH brute-force attacks), you can do the following to change SSH port.

vi /etc/ssh/sshd_config

change port from 22 to 2222

#Port 22
Port 2222

Then restart sshd

/etc/init.d/sshd reload

Use SSH:

ssh -p 2222 myservername

Use SCP:

scp -P 2222 myfile.txt me@myservername:/~/.

Technorati : ,

Popularity: 1%

Leave a Comment

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word