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!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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:
    568
    Likes Received:
    40
    Trophy Points:
    28
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page