Page 1 of 1

SSH on non-standard port

Posted: 21 Feb 2014, 18:54
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

Re: SSH on non-standard port

Posted: 21 Feb 2014, 21:12
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.

Re: SSH on non-standard port

Posted: 21 Feb 2014, 22:16
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.

Re: SSH on non-standard port

Posted: 21 Feb 2014, 23:20
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