tecwithquestion

Well-Known Member
Oct 20, 2014
61
1
58
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.
 

SysSachin

Well-Known Member
Aug 23, 2015
604
48
28
India
cPanel Access Level
Root Administrator
Twitter

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,227
463
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.