Portal Home > Knowledgebase > Articles Database > closing port 22


closing port 22




Posted by webroots05, 08-29-2008, 05:13 PM
hello, I'm using CSF as a firewall on my CentOS server, I'm Running SSH on other port rather than default port 22 with protocol 2, Do I have to close port 22? Thanks! (i know it's a silly question... )

Posted by anandkj, 08-29-2008, 05:23 PM
From security point of view, it is always good to close a port that is unused. Since you are using a different port for SSH, you can close port 22, unless you use sftp for file transfer.

Posted by Jonathan Kinney, 08-29-2008, 07:48 PM
Once you configure sshd to use a different port, you can firewall it if you please, it will just prevent any use of that port if something were to be setup to listen on that port. An sftp connection is handled by a program called over ssh, and all the data is streamed over that ssh connection, so no other application should be needing port 22.

Posted by TheITAdvisory, 08-29-2008, 10:32 PM
SCP can be issued the -P command to specify a different port. You can safely close port 22 either by iptables or CSF/APF which uses iptables anyway.

Posted by prashant1979, 08-30-2008, 11:39 AM
It is good to know that you have changed the SSH port of the server to another port. However, for increased security you should also consider changing the authentication method to Public Key Authentication instead of Password Authentication. You can get the information from the following URLs http://www.securityfocus.com/infocus/1810 http://www.unixwiz.net/techtips/putt...h.html#keypair



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
United Hosting (Views: 703)
comforthost.net down? (Views: 649)

Language: