Last active
July 7, 2021 19:51
-
-
Save stevejenkins/0c2687936f31cd0deda1 to your computer and use it in GitHub Desktop.
Simple shell script to remotely reboot a Ubiquiti UBNT UniFi Access Point (UAP, UAP-PRO, UAP-AC, etc.)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#MOVED TO: https://github.com/stevejenkins/unifi-linux-utils |
Project moved to: https://github.com/stevejenkins/unifi-linux-utils
Can I reboot Ubiquiti Nanostation M2 using this script?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using
askpass
and disabling hostkey checking is insecure by nature.Since it is supported out of the box, you should consider using public key authentication for passwordless access.
ssh passwords are much easier to brute force than keys or if someone sets up an account to make this script work as is, the device is easily compromised.
Hostkeys should be enforced and updating them on a different audit-able cycle from this script should be considered if security is a concern. To do that from the command line you can use
ssh-keyscan
to collect relevant hostkeys.ssh-keygen -R
can be used to delete a hostkey programmatically if you find one that needs to be updated.Hostkeys make sure that the remote device is the device you expect it to be. If the key changes and you had not done anything to cause the change, you should treat it as a rogue device.