SSH Client

I've decided I would like a SSH client so I can create a router WiFi presence driver without a bunch of pieces. There are solutions out there for this but they require a node.js server or a script running on the router or a special firmware or a always on computer running python, etc.

If we had a SSH client we could create a driver that would be able to login to a router directly to get presence (connected device info). With AsusWRT, DD-WRT routers we could even set schedules in HE to turn off WiFi access for certain wireless clients to coincide with HE modes or something. For example, it's Night Mode on HE. Set the kid's WiFi connections to off by setting NVRAM variables, etc.

It could also be used in conjuction with WOL to create switches in HE that could turn on and off computers (or sleep them).

We have telnet client but a lot of devices don't support telnet and instead use ssh. In fact, my router used to have telnet until September last year when they removed support for it and only kept ssh.

4 Likes

Been asked for several times and the Hubitat team has consistently said that they will not provide access to the hub that way. Do a search and you'll see.

That’s not what is being asked. The ask is for the hub to invoke a SSH connection to another device.

8 Likes

I have an app that does WOL. How would you do the sleep portion?

Eventghost!

1 Like

There's command line tools in pretty much any OS to change the operating system state.

Examples here.

Windows:

Linux:

1 Like

I thought you might be getting the pc to sleep through groovy code directly...so my ears perked up.

I've really wanted the same for a while now. My use case is to restart HomeBridge or another docker container or my RetroPie.

I came across this thread that is similar:

I was recommended to check out OmniThing, but haven't had a chance to look into it yet. Seems a bit complex for just sending a SSH command to a local device on your network though.

I would love a virtual switch that can have the on/off actions tied to different ssh commands and a state tied to a query to tail a log or something.

2 Likes

You got more likes for this than the actual feature request. Heh. There is no money in ideas I guess.

3 Likes

An SNMP client would be way more useful for dealing with a router.

Except that not all consumer grade routers expose SNMP (unfortunately). :frowning:

... and not all support SSH, or even a command line, and many (most?) probably shouldn't even be called routers because they also support only NAT gateway and don't support routing protocols (e.g. RIP or OSPF).

If you have a need to remotely monitor and control a router, SNMP is the proper way to do it, and that may require a more fully featured router.

1 Like

Fair points.

It might be more useful to monitor a specific set of routers but it's not more useful in general. I decided I wanted a SSH client not because it's the right way to monitor routers. My request was to get another useful client that would allow a breadth of activities; far more than just monitoring a specific set of routers.

Here's another example. With an API project that has a node.js server or some other external part that can be controlled via SSH, the device handler could turn it on and off when it's not being used or recover it if it was crashed.

3 Likes

You can do this with Omnithing. If you ran omnithing on your NodeJS server, you can execute command line commands directly from omnithing. So, you could have a switch that starts and stops the nodeJS server. No need to SSH in.

I think you are missing the point. I don't want a node.js server. You can do ANYTHING with external pieces. Literally anything. From Hubitat you could call a node.js server to launch nuclear missiles... I don't want external pieces.

A native SSH client could make a few of the external node.js servers just go away. This could make other external parts just go away. Less pieces is easier to install and quite frankly it's easier to maintain (so long as the groovy doesn't get in the way).

3 Likes

YES PLEASE! Can I buy the missiles on Amazon???

3 Likes

heh... a quick search yielded this.

4 Likes

Too small... I'm looking for something that will take out at least a few cars in my way... :wink:

1 Like

You just said you want to turn the nodejs server on and off. And omni thing isn't external. It's right there in Hubitat. And Omni thing can be used to execute any command you want from the command line, just like SSH. If you can type it, it can do it. Have you looked at it?

Also, I don't understand how you can say you don't want external pieces when, by definition, SSH is only used to talk to external pieces. If you arent going to use an SSH client to talk to external pieces, what are you going to use it for?

Remember, this is a HOME AUTOMATION platform. You can't talk to lights and switches using SSH so i doubt that Hubitat is going to spend the time developing and adding one. The interest isn't there. I want them fixing the bugs that are there now!