17.06.2024, 08:34 
		
	
	
		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
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
	
	
	
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 45How 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
 
 

 
