Maddeen Posted April 7, 2023 Share Posted April 7, 2023 Hey everybody, hope someone can help me out with this because im not that into SSH stuff. Background: I need to perform the following SSH command to reconnect my UniFi Dream Machine Pro to my local ISP. This is recommended to make sure that the reconnect will apply on a time no one at my home cares. Due to the fact that this is a UniFi specific problem I searched in the common communities and found that solution Quote For everyone who does not want to UDM utilities boot script you could schedule the reconnect from a different system via ssh using sshpass. Not pretty, but works for me. I added the following line to my local server to do the reconnect at 3am: Sadly the person - as you can read - uses a tool called SSHPASS and I‘m not aware how to install/use this on unRAID nor - and this is even more interesting - if I need this tool in this case, because maybe unRAID can handle it out of the box? Here is the command that the person I quoted has stated out. 0 3 * * * sshpass -p <MY_UDM_SSH_PASSWORD> ssh -o StrictHostKeyChecking=no root@<MY_UDM_IP> "killall -HUP pppd" Can anyone help me out here and tell me the best way to achieve my goal? Thanks in advance. Nice easter everybody! Quote Link to comment
primeval_god Posted April 7, 2023 Share Posted April 7, 2023 Knowing exactly zero about the tools or devices you are working with i would do the following. Use the user.scripts plugin to create and schedule the execution of a script. Make that script launch your desired command in a docker container with sshpass installed such as this for example https://hub.docker.com/r/javieraviles/sshpass#! (litterally the first one that came up in a search, not an endorsement of the container). 1 Quote Link to comment
Maddeen Posted April 8, 2023 Author Share Posted April 8, 2023 (edited) Thanks. I’ll try it but I’m pretty sure that I’ll come back and ask for more support 🙈 Hope you’ll have the time for assisting me again. I’m a complete noob when it comes to CMD/scripting stuff. In the end, my requirement sound easy - just perform a ssh call on a daily basis. But for me it’s mostly rocket science 🙈😜 Edited April 8, 2023 by Maddeen Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.