SSH on non-standard port

Post Reply
krazykatz911
Junior Member
Posts: 19
Joined: 12 Feb 2014, 14:37

SSH on non-standard port

Post by krazykatz911 »

Can someone explain the process of changing the SSH on non-standard port,

(whm / cpanel)


Also, if this is changed to a non-standard port, what port is recommended?

After it is changed, what would need to be changed in CSF?


Thank you
jimlongo
Junior Member
Posts: 19
Joined: 19 Oct 2013, 00:33

Re: SSH on non-standard port

Post by jimlongo »

Edit the file /etc/ssh/sshd_config to change the port.

Enable that port in CSF config IPv4 Port Settings. Then you probably want to disable 22.

Recommended port? Something that doesn't clash with other existing ones like 20222.
krazykatz911
Junior Member
Posts: 19
Joined: 12 Feb 2014, 14:37

Re: SSH on non-standard port

Post by krazykatz911 »

Hi Jim, Thank you! Do I just delete 22 from the port settings, is that how I disable it?


Thank you so much for your help.
Sergio
Junior Member
Posts: 1712
Joined: 12 Dec 2006, 14:56

Re: SSH on non-standard port

Post by Sergio »

@krazykat,
check TCP IN/OUT and UDP IN/OUT and replace the occurrences of 22 by the new port that you want to set.

You can choose any port that does not conflict with any of the ports used by CPanel, it doesn't matter which one you use.

A nice article to read about it:
http://docs.cpanel.net/twiki/bin/view/1 ... eSSHConfig
Post Reply