Enable / disable ssh root login via API

,

Hello,

Is there any way to check via API that ssh root login as allowed or disabled? I can change the state but I can’t read out the value before the modification. I didn’t find any possibility to check the current state via API.

Thank you!

Hi dss

You can view the ssh users allowed or disabled from nodeworx, siteworx shell users

I hope that helps

Many thanks

John

[QUOTE=d2d4j;27077]Hi dss

You can view the ssh users allowed or disabled from nodeworx, siteworx shell users

I hope that helps

Many thanks

John[/QUOTE]

Thank you John!

This is not I looking for. With this solution I can check if user is enabled or disabled. I want to check if root login is allowed or disabled. You can find this configuration in NodeWorx / System Services / SSH Server -> SSH Server Options.

Hi dss
Sorry, it must be too early for me when I replied, and you are posting re API.
Have you seen this from IW API commands, which I think you would have, and I am of 2 minds if API checks sudo or just displays last chosen setting.
Sorry I could not be mopre helpful, and you may want to open a support ticket to ask IW.
Many thanks
John

Hi John,

Thank you very much your help! I want to check last chosen setting as you wrote. I can’t figure out how to make it via API. It would be great to have a “listConfig” action in the /nodeworx/sshd controller.

Hi dss
I think I might have found your answer.
Please see this from IW API, which is a different section, but should I believe give you the correct output. (i.e condtion of sysem users - which you should be able to specify root only I believe)
You can test it quickly from CLI (ssh, nodeworx, option 11, option 2)
I hope that helps a little
Many thanks
John