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.

How to access a cPanel account using root?

Discussion in 'General Discussion' started by Akhil K Aniyan, Sep 4, 2016.

  1. Akhil K Aniyan

    Akhil K Aniyan Registered

    Joined:
    Dec 5, 2013
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Hello!

    I'm new to VPS and SSH. I just upgraded my shared hosting to VPS.

    Currently I have 2 cPanel accounts in my WHM. I want to know, how can I access an addon domain via SSH using root.

    I'm using mac terminal to access my server.

    Do I need to go to the corresponding cPanel account and generate key to access the addon domain?

    Actual requirement:

    I want to run this command on my magento installation: php bin/magento indexer:reindex

    But this command need to be executed in the installation directory of magento.

    Please help.

    Thanks.

    Akhil K A
     
  2. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,577
    Likes Received:
    40
    Trophy Points:
    48
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    with root ssh you have access to everything

    but if you wanted to access just that user you would grant ssh access to that user in whm and log in as username@yourip


    if you wanted to access via your root connection you would issue the command su username
     
    Akhil K Aniyan likes this.
  3. Eric

    Eric Administrator
    Staff Member

    Joined:
    Nov 25, 2007
    Messages:
    746
    Likes Received:
    11
    Trophy Points:
    18
    Location:
    Texas
    cPanel Access Level:
    Root Administrator
    Howdy,

    You could su - <accountuser> to act as that user. Make sure the user has a shell like bash before you move.

    Thanks!
     
    Akhil K Aniyan likes this.
  4. Akhil K Aniyan

    Akhil K Aniyan Registered

    Joined:
    Dec 5, 2013
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    That's goesn't gave access to the public_html directory of a particular user.

    But this command helped!

    cd /home/USERNAME/public_html/

    Thanks.
     
Loading...

Share This Page