whmapi1 is a command line tool in cpanel server, that can be used for many WHM API call.
To get WHM access to an account using root SSH, run
whmapi1 create_user_session user=root service=whostmgrd locale=en
Getting Cpanel Access from root SSH
whmapi1 create_user_session user=USERNAME service=cpaneld locale=en
Replace USERNAME with your user name.
Example
[root@server78 ~]# whmapi1 create_user_session user=hoston service=cpaneld locale=en --- data: cp_security_token: /cpsess2861136544 expires: '1490648623' locale: en service: cpaneld session: hoston:eizCyj88xF0Bp0t2:create_user_session,2a323820e26953b958038712601c43b5 url: https://server78.hostonnet.com:2083/cpsess2877136544/login/?locale=en&session=hoston%3aeizCyj66xF0Bp0t2%3acreate_user_session%2c2a44420e269588958038712601c43b5 metadata: command: create_user_session reason: Created session result: 1 version: 1 [root@server78 ~]#