Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Performing a SSH command to a network device on daily basis

Featured Replies

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!

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).

  • Author

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 by Maddeen

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.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.