Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Grant ssh access using command line

Discussion in 'General Discussion' started by tecwithquestion, Nov 8, 2016.

Tags:
  1. tecwithquestion

    tecwithquestion Well-Known Member

    Joined:
    Oct 20, 2014
    Messages:
    57
    Likes Received:
    1
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    Hello

    Can someone please let me know how to grant ssh access to user command line ? Is it possible using whmapi1 modifyacct user=$USERNAME ?

    Please suggest.
     
  2. SysSachin

    SysSachin Well-Known Member

    Joined:
    Aug 23, 2015
    Messages:
    604
    Likes Received:
    43
    Trophy Points:
    28
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,802
    Likes Received:
    1,895
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    First, make sure the default shell is set to "jailshell" if that's what you prefer. You can configure this via the "System" tab in "WHM >> Tweak Settings", or by ensuring the following option is set to 1 in /var/cpanel/cpanel.config:

    jaildefaultshell

    Ensure you run the "/scripts/restartsrv_cpsrvd" command after making any changes to /var/cpanel/cpanel.config. Then, run a command like this based on the document referenced in the last post:

    Code:
    whmapi1 modifyacct user=$username HASSHELL=1
    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice