Results 1 to 5 of 5

Thread: How to find out if SSH is enabled?

  1. #1
    Member
    Join Date
    Oct 2003
    Posts
    11

    Default How to find out if SSH is enabled?

    Hello ...

    Is there a way to find out if SSH has been enabled for a user through the cPanel API?

    I was thinking about something like this:
    <cpanel print="$CPDATA{'FEATURE-SSH'}">

    since I have found examples that use the FEATURE-HORDE variable:
    $CPDATA{'FEATURE-HORDE'}

    Regards,
    Mat

  2. #2
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,307
    cPanel/WHM Access Level

    Root Administrator

    Default

    Quote Originally Posted by mberchtold View Post
    Hello ...

    Is there a way to find out if SSH has been enabled for a user through the cPanel API?

    I was thinking about something like this:
    <cpanel print="$CPDATA{'FEATURE-SSH'}">

    since I have found examples that use the FEATURE-HORDE variable:
    $CPDATA{'FEATURE-HORDE'}

    Regards,
    Mat
    That would be $hasvalidshell. Here's the XML API URL I used to find this value:

    https://SERVER:2083/xml-api/cpanel?xmlin=<cpanelaction><module>print</module><func></func><apiversion>1</apiversion><args>$hasvalidshell</args></cpanelaction>

  3. #3
    Member
    Join Date
    Oct 2003
    Posts
    11

    Default

    Thank you. Works as expected :-)

    BTW: In case you are interested. I have implemented cPanel user import in SmartFTP's latest version: http://www.smartftp.com/download

    HowTo:
    http://www.smartftp.com/support/kb/h...nel-f2622.html

    Regards,
    Mat

  4. #4
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,307
    cPanel/WHM Access Level

    Root Administrator

    Default

    Quote Originally Posted by mberchtold View Post
    Thank you. Works as expected :-)

    BTW: In case you are interested. I have implemented cPanel user import in SmartFTP's latest version: http://www.smartftp.com/download

    HowTo:
    http://www.smartftp.com/support/kb/h...nel-f2622.html

    Regards,
    Mat
    That looks very interesting. If you need any further help with our APIs, feel welcome to let us know.

  5. #5
    d_t
    d_t is offline
    Member
    Join Date
    Sep 2003
    Location
    Bucharest
    Posts
    239

    Default

    I dont't understand. Why is interesting to import FTP sub-accounts if you already have the user/pass for the main account? Maybe I miss something...

Similar Threads

  1. SSH key enabled, how login in WHM with Firefox?
    By rowtc2 in forum New User Questions
    Replies: 4
    Last Post: 06-27-2009, 12:36 AM
  2. User operations through ssh (when enabled) ?
    By webstyler in forum cPanel & WHM Discussions
    Replies: 2
    Last Post: 07-28-2008, 01:46 PM
  3. Find and replace via SSH
    By marquis_ce in forum New User Questions
    Replies: 1
    Last Post: 04-21-2008, 11:53 AM
  4. I need to find out how many users have spamassassin enabled
    By CoolMike in forum E-mail Discussions
    Replies: 2
    Last Post: 01-03-2008, 05:07 AM
  5. How do I enabled Shell/SSH Access from Cpanel?
    By UniSol in forum cPanel & WHM Discussions
    Replies: 2
    Last Post: 06-20-2007, 12:07 PM