Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 19
I don't understand that ssh/telnet client feature in cpanel. I tried using it and it does not work. I enter username/password and it (supposdely) logs in and but the cursor ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2004
    Posts
    52

    ssh port problem


    I don't understand that ssh/telnet client feature in cpanel.

    I tried using it and it does not work. I enter username/password and it (supposdely) logs in and but the cursor just sits there and does nothing. I am using IE 6 also.

    Anyone knows the story behind this thing?

    Also, I want to change the port 22 to something else, I tried 26 on a server, restarted ssh after adding 26 to the allowed ports in APF firewall and then attempted to login via Putty but tells me connection refused. What have I done wrong?

    I changed
    #port 22
    to
    port 26


    As for trying to login to ssh/telnet in cpanel, that is another case on a different server that is using default port 22. Reason why I'm testing that is because someone needs to use it to login from another country where port 22 is not allowed. I am testing it with default port first to see if it allows to login with sudo root. Perhaps you can answer this now for me

    Thanks

    Specs:
    Fedora Core 1 and 2 (testing both)
    cPanel/WHM

  2. #2
    Linux Engineer
    Join Date
    Sep 2003
    Location
    Knoxhell, TN
    Posts
    1,078
    Please post your /etc/ssh/sshd_conf.... Also, why are you trying to use a web browser to access an ssh session?

    Telnet can not communicate with an ssh server, as ssh is encrypted and telnet is plaintext...

    The port problem may be an issue with software firewall or a hardware router... Or a combination of both. Check both you software and hardware firewalls... Make sure that port 22 and/or 26 are being forwarded to the correct IP address on your LAN.
    Their code will be beautiful, even if their desks are buried in 3 feet of crap. - esr

  3. #3
    Just Joined!
    Join Date
    Oct 2004
    Posts
    52
    This is one a dedicated server at a data center, not at home. I don't have any hardware firewall but APF software firewall.

    For that file, I can't get in now (waiting for dc to provide serial console access). I disabled telnet a while ago to but this is both ssh/telnet. I don't see options to select one over the other anyway.

    For the ssh file, the only thing I did was uncomment port 22 and change the number to 26. My fault for not just adding it and leaving 22 to test it. First attempt anyway

    I added 26 (but didn't minus 22 at least) to APF allowed ports in /etc/apf/conf.apf file.

    Looks like this:
    # Common ingress (inbound) TCP ports -3000_3500 = passive port range for Pure FTPD
    IG_TCP_CPORTS="21,22,25,26,53,80,110,143,443,2082, 2083, 2086,2087, 2095, 2096,3000_3500"
    #
    # Common ingress (inbound) UDP ports
    IG_UDP_CPORTS="53"

    # Common egress (outbound) TCP ports
    EG_TCP_CPORTS="21,25,80,443,43,2089"
    #
    # Common egress (outbound) UDP ports
    EG_UDP_CPORTS="20,21,53"

    To be honest, I couldn't remember how to scan for available ports (please provide that, thank you) so I just selected 26 considering I'm 99% sure nothing is using that port.

  4. #4
    Linux Engineer
    Join Date
    Sep 2003
    Location
    Knoxhell, TN
    Posts
    1,078
    if you were choosing a random port, i would have chosen a high number (2342 maybe??)... that is the only real way to assure you get a port not used by a standard service.

    when you changed the firewall conf, did you restart the firewall process?

    after you changed the sshd_conf, did you restart sshd?
    Their code will be beautiful, even if their desks are buried in 3 feet of crap. - esr

  5. #5
    Just Joined!
    Join Date
    Oct 2004
    Posts
    52
    Yes, like I said I don't know how to check for available open ports (please explain to me how, thanks)

    Yes, restarted firewall and sshd

  6. #6
    Linux Engineer
    Join Date
    Sep 2003
    Location
    Knoxhell, TN
    Posts
    1,078
    use netstat(1) (the (1) is the manual section that the manpage is in... man 1 netstat to read it)
    Their code will be beautiful, even if their desks are buried in 3 feet of crap. - esr

  7. #7
    Just Joined!
    Join Date
    Oct 2004
    Posts
    52
    I'm sorry but I do not understand what you mean that the (1) is where the man page is. please explain

  8. #8
    Linux Engineer
    Join Date
    Sep 2003
    Location
    Knoxhell, TN
    Posts
    1,078
    the UNIX manual pages are divided into various sections... section 1 is for utilities and other programs... 2, i forget... 3 is the programmer's manual, etc, etc....

    when you see a UNIX command typed with a number in parentheses after it, it just means that the person is referring to the command referenced by the manpage in the section of the manual that corresponds to the number.

    so netstat(1) means the 'netstat' referenced by Manual Section 1, Page 'netstat'
    Their code will be beautiful, even if their desks are buried in 3 feet of crap. - esr

  9. #9
    Just Joined!
    Join Date
    Oct 2004
    Posts
    52
    Ok thanks for your kindness in support

    I ran netstat 1 and it gave me endless lines, on and on and on

    I stopped it after at least 1,000 lines or so. All I want to do is know what ports are free/available so I can use one for a different (higher) ssh port and disable default 22.

    Also, can you please confirm that to disable default 22 and use another port all I have to do is uncomment port 22 and change 22 to a different port number, restart sshd? Is this all needed?

    Also,

    root@server [~]# man 1 netstat
    No entry for netstat in section 1 of the manual

  10. #10
    Linux Engineer
    Join Date
    Sep 2003
    Location
    Knoxhell, TN
    Posts
    1,078
    netstat -n -I

    that will list only listening ports, using numbers instead of symbolic hostnames.
    Their code will be beautiful, even if their desks are buried in 3 feet of crap. - esr

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •