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.

How to find out if SSH is enabled?

Discussion in 'cPanel Developers' started by mberchtold, Apr 2, 2009.

  1. mberchtold

    mberchtold Member

    Joined:
    Oct 2, 2003
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    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. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    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. mberchtold

    mberchtold Member

    Joined:
    Oct 2, 2003
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
  4. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
  5. d_t

    d_t Well-Known Member

    Joined:
    Sep 20, 2003
    Messages:
    243
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Bucharest
    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...
     
Loading...

Share This Page