The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

SSH Access to WHM

Discussion in 'General Discussion' started by alanwhiteman, Nov 20, 2013.

  1. alanwhiteman

    alanwhiteman Registered

    Joined:
    Nov 19, 2013
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi,

    I'm trying to access WHM via my Linux terminal. I've tried to follow the instructions in the documentation section, but to no avail.

    In the command prompt I enter the following:

    ssh -v -p 2087 root@[ip.address]

    With the following result:

    OpenSSH_6.1p1 Debian-4, OpenSSL 1.0.1c 10 May 2012
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug1: /etc/ssh/ssh_config line 19: Applying options for *
    debug1: Connecting to <ip.address> [<ip.address>] port 2087.
    debug1: Connection established.
    debug1: identity file /home/alan/.ssh/id_rsa type -1
    debug1: identity file /home/alan/.ssh/id_rsa-cert type -1
    debug1: identity file /home/alan/.ssh/id_dsa type 2
    debug1: Checking blacklist file /usr/share/ssh/blacklist.DSA-1024
    debug1: Checking blacklist file /etc/ssh/blacklist.DSA-1024
    debug1: identity file /home/alan/.ssh/id_dsa-cert type -1
    debug1: identity file /home/alan/.ssh/id_ecdsa type -1
    debug1: identity file /home/alan/.ssh/id_ecdsa-cert type -1
    ssh_exchange_identification: Connection closed by remote host

    I've tried generating ssh keys in WHM and in my local Linux computer. Importing the public key from my computer to WHM does not work; importing the public key from WHM to my computer doesn't either. Rather frustraing.

    Any help with this will be greatly appreciated!
     
  2. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    You cannot access the WebHost Manager via SSH. The WHM is a graphical interface that you can only access using a Web browser. What you are trying to do is just not going to work.

    To access the server via SSH, use port 22 (unless the SSH port is not the default). Unless you have changed the SSH port on the server from the default, you do not even need to specify the port. There is no way to access the WHM via SSH. Just connect directly to the server via SSH on the SSH port, and the WHM is not involved in any way.

    When you connect to the server via SSH, you will see the Linux command prompt, not the WHM. You are going to need a basic working familiarity with the Linux shell in order to do much via SSH.

    To access the WebHost Manager, open your favorite Web browser and load it using this URL:

    https://[I]ip_address[/I]:2087

    Replace ip_address with the actual IP address. The username is root, and the password is the server's root password.

    Our instructions for accessing the WHM are here:

    http://docs.cpanel.net/twiki/bin/view/AllDocumentation/WHMDocs/AccessingWhm

    I do not see a mention of the ssh command there. I do see "Type: https://IP:2087 into your preferred Internet browser." Can you tell me where you saw to use the ssh command to access the WHM?
     
  3. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    If we have documentation that tells you to use ssh with the port 2087, then it is incorrect and it needs to be fixed. Can you please provide a link to the documentation that you were following?
     
  4. alanwhiteman

    alanwhiteman Registered

    Joined:
    Nov 19, 2013
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi Jared,

    Sorry for the missunderstanding, I was under the impression that this was possible. I got the instructions from here:

    SSH/Shell Access

    But obviously, these instructions do not apply to WHM. Probably only to cPanel.

    I can access WHM through the browser fine. But my objective is to access the server through a terminal so that I can see the file structure. The problem I'm trying to solve is to see why the directory /usr is taking so much space.
     
  5. alanwhiteman

    alanwhiteman Registered

    Joined:
    Nov 19, 2013
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
  6. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    That documentation is actually for the SSH terminal Java applet in cPanel. The $port mentioned is supposed to be the server's SSH port, not a cPanel or WHM port. The reason it is written as a variable is that by default the SSH port is 22, but it can be changed by the server's administrator. One would never need to make an SSH connection to the server's WHM or cPanel ports.

    The SSH terminal applet in cPanel is a Java applet that is meant to allow a user to access the server via SSH from cPanel, not to somehow allow SSH access to the WHM or cPanel.

    If you are not familiar with basic Linux shell commands, the following tutorials may help you to narrow down the source of the disk usage in /usr:

    How to Find Out Disk Usage on a Linux Server
    Commands for Server File System Info
     
Loading...

Share This Page