Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Jul 2002
    Posts
    25

    Default Changing SSH port, binding to one IP... good or bad idea?

    I read that changing SSH's port (in /etc/ssh/sshd_config) from 22 to a random high port is good for security. I tried it, restarted OpenSSH, and got the message below. I was still able to SSH back in and change the port back to 22.

    Is this a good or bad idea while using cPanel?

    Also, when people suggest "binding SSH to one IP" for security, what good does that do? I suppose it would keep people from knowing where to start their hacking but wouldn't it prevent users from logging in with theirdomain.com?

    Aug 4 11:16:31 server1 sshd: sshd -TERM succeeded Aug 4 11:16:34 server1 sshd: succeeded Aug 4 15:44:19 server1 sshd: sshd -TERM succeeded Aug 4 15:44:19 server1 sshd: sshd -TERM succeeded Aug 4 15:44:19 server1 sshd: succeeded Aug 4 16:13:23 server1 sshd: sshd -TERM succeeded Aug 4 16:13:23 server1 sshd: sshd -TERM succeeded Aug 4 16:13:23 server1 sshd: succeeded Aug 4 16:15:52 server1 sshd: sshd -TERM succeeded Aug 4 16:15:52 server1 sshd: sshd -TERM succeeded Aug 4 16:15:52 server1 sshd: succeeded Aug 4 16:28:32 server1 sshd: sshd -TERM succeeded Aug 4 16:28:32 server1 sshd: sshd -TERM succeeded Aug 4 16:28:32 server1 sshd: succeeded Aug 4 16:29:12 server1 sshd: sshd -TERM succeeded Aug 4 16:29:12 server1 sshd: sshd shutdown failed Aug 4 16:29:12 server1 sshd: succeeded sshd has failed, please contact the sysadmin.
    cPanel.net Support Ticket Number:

  2. #2
    Member rogcan's Avatar
    Join Date
    Jun 2004
    Posts
    49

    Default

    I know this is an old post but does anyone have an answer for this ???

    I had the exact same question so i thought it was best to keep this one updated.

  3. #3
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    Digging up 3 year old threads isn't usually a good idea

    That said, changing the SSH daemon port to a high random number is indeed a good idea and usually means that SSH port scans from script kiddies pass you by. Binding to a specific IP address is also a good idea as it means that you're reducing the likelyhood of an SSH port attack by the number of IP's on the server less the one it is on - i.e. smaller target.

    Restarting SSHD in WHM will always how an error if you run it on a non-standard port.
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  4. #4
    Member
    Join Date
    Jan 2004
    Posts
    755

    Default

    Since we're on the un-dead subject... a friend mentioned he changed SSH to port 21 to confuse the port scanners... not sure how I feel about that. Thoughts?

  5. #5
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    Obviously you would have to disable/move FTP to do that. However, the port is still going to be bombarded with FTP exploit scans so it's usually a better idea to run it on an ephemeral port (>1024).
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

Similar Threads & Tags
Similar threads

  1. Changing Port Kills SSH
    By elflaco in forum New User Questions
    Replies: 9
    Last Post: 01-04-2007, 09:49 PM
  2. changing ssh port fails
    By Lyttek in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 01-31-2006, 03:29 PM
  3. Disabling spamassassin. Good or bad idea?
    By TogaDave in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 06-23-2005, 04:01 PM
  4. TOMCAT: good or bad idea
    By Secret Agent in forum cPanel and WHM Discussions
    Replies: 6
    Last Post: 11-08-2004, 01:31 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube