This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Network Switch Control with SSH
#1
I'd like to SSH into our Unifi Switches to run a 1 line command to turn on/off a POE connected device. 

While a POE reboot is is possible with the Unifi API, switching a port off for an extenede period of time is not - so SSH seems like a simple solution.  This is the command that need to be executed

Code:
ssh admin@192.168.1.100

<enter password as prompted>

swctrl poe set off id 45

How does one SSH to the switch at 192.168.1.100 from a lua script?

If it helps, one can connect to the Unifi switch with a SSH key instead of a password.

Many thanks in advance 

Kind Regards
James
Reply
#2
Check this: https://forum.logicmachine.net/showthrea...742#pid742
Reply


Forum Jump: