Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 10 of 10
  1. #1
    Member
    Join Date
    Nov 2006
    Posts
    7

    Question Changing Port Kills SSH

    Hi All:

    I have been reading and utilizing 000000000's exceptional "A Beginners Guide to Securing Your Server", but have hit a bit of a snag.

    Every time I attempt to change the port to a number other than 22 per the instructions, I can't SSH in any longer. Not as root (which is disabled anyway) or as the other user in the wheel group. I either get "Access Denied" or "No address associated with nodename". I have restarted the ssh services both through the terminal and on WHM. A couple of times I've had to use the nifty little script that Chirpy supplied (thank God he's not evil) to get back into the server via SSH.

    Now, as I said, I am following the guide step by step, so I haven't gotten to the part where I would install the firewall, so it isn't like I forgot to open the new port on the FW.

    Is there something painfully obvious I'm missing here? I've searched the forums, as well as Google, but can't find this exact problem.

    Thanks in advance for any assistance you might lend.

    **Edit**

    This is on a VPS running RHL 4
    Last edited by elflaco; 01-04-2007 at 06:18 PM.

  2. #2
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Nov 2001
    Posts
    205
    cPanel/Enkompass Access Level

    DataCenter Provider

    Default

    did you open whatever port you changed ssh to on your firewall?

    Frank

  3. #3
    Member
    Join Date
    Nov 2006
    Posts
    7

    Default

    That's what is odd: I haven't installed a firewall yet.

    I'm guessing that I need to skip ahead, install the firewall, and then go back and change the port...

  4. #4
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Nov 2001
    Posts
    205
    cPanel/Enkompass Access Level

    DataCenter Provider

    Default

    no,

    I was just thinking you locked yourself out with a firewall.

    Frank

  5. #5
    Member
    Join Date
    Jan 2004
    Posts
    755

    Default

    Check with your datacenter to make sure they've not blocked the port upstream of you...

  6. #6
    Member serversphere's Avatar
    Join Date
    Jan 2004
    Posts
    658

    Default

    May be silly, but did you change the port on your SSH client from 22 to the new port? The port might be changed on the server but your program might still be trying on 22?
    Darren Benfer | SS-Darren | AIM: serversphere
    www.serversphere.com
    Dedicated Server Solutions Have Come Full Circle

  7. #7
    Member
    Join Date
    Nov 2006
    Posts
    7

    Default

    Quote Originally Posted by Lyttek View Post
    Check with your datacenter to make sure they've not blocked the port upstream of you...
    Good idea.

    I'll give that a shot and let you know.

  8. #8
    Member
    Join Date
    Nov 2006
    Posts
    7

    Default

    Quote Originally Posted by webtiva View Post
    May be silly, but did you change the port on your SSH client from 22 to the new port? The port might be changed on the server but your program might still be trying on 22?
    Not silly, as I usually forget the first time I log in, but I still get the same result when I change the port#.

  9. #9
    Member
    Join Date
    Mar 2004
    Posts
    710

    Default

    If root is disabled - what group is wheel getting it's permissions from?
    Lloyd F Tennison

  10. #10
    Member
    Join Date
    Nov 2006
    Posts
    7

    Default

    Quote Originally Posted by lloyd_tennison View Post
    If root is disabled - what group is wheel getting it's permissions from?
    Another non-sensical account I created to make it harder to guess.

    And I figured out what the issue was; I only restarted the ssh server, and not apache.

    I restarted apache, and it worked fine.

    Thanks to everyone for their assistance!



    **Edit**

    I do have one question, though.

    Why is the sshd_config file blank now?
    Last edited by elflaco; 01-04-2007 at 11:57 PM.

Similar Threads & Tags
Similar threads

  1. Changing port 80
    By Swaroop in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 04-25-2006, 03:36 PM
  2. changed ssh port - cant login on new port
    By 4u123 in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 03-21-2006, 11:02 AM
  3. Changing SSH port, binding to one IP... good or bad idea?
    By Gliebster in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 02-13-2006, 04:11 AM
  4. changing ssh port fails
    By Lyttek in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 01-31-2006, 04:29 PM
  5. Custom ssh port for CPanel SSH client
    By yaax in forum cPanel and WHM Discussions
    Replies: 13
    Last Post: 10-24-2004, 01:22 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube