Hacker News new | past | comments | ask | show | jobs | submit login
Control your server using Whatsapp (funnybretzel.com)
58 points by ilovefood on Oct 21, 2015 | hide | past | web | favorite | 38 comments

"Lately, I've been working on a project to automate lots of stuff on a continent wide scale... My programs sometimes fail, sometimes they work well but I need to supervise them. They are not even 6 months old."

Thinking about this, it feels like the author is adding bandage on a leg, after breaking it. If you need to supervise your programs so you can't even leave the computer, feels like your time would be better spent on writing your software so it CAN (and will) fail but can recover by itself.

This is the best point in the whole comments section. I am still learning Python a bit and it's my biggest project.

If you have any advice, methodology or anything that would make me a better programmer please share it with me.

Not OP, but the best lesson I've learned in the past couple of years is that the code you don't write doesn't break.

I used to write code to fix existing problems; now I see if there's code I can refactor or remove first. Big difference.

Why on earth would you build anything remotely critical on a closed, proprietary, for-profit service such as WhatsApp? That's not even to mention that this sounds like a humongous kludge! A bit like proudly proclaiming that your Facebook-over-DNS-via-carrier-pidgeon is your super cool way of remoting to your server... If and when whatever API provider decides that you're not abiding by their EULA you're hosed.

That's aside from `diggan's point, which i agree with: if you need to babysit your server to such a degree, something is wrong.

> this sounds like a humongous kludge

We're on Hacker News, right?

This is not about using whatsapp as an SSH client, I presented the whole thing wrong. My main concern, is, when you have programs that run in the real world, they sometimes break without you even being able to fix the screwups. I use whatsapp just to remotely run predefined functions, no SSH involved.

I agree that allowing SSH would be a real issue, and better use an SSH client for that purpose.

But then, let me just clarify one thing for the people thinking that "Oh Whatsapp is owned by facebook it's evil". Do you really think that app on your Android device or your iPhone device will be foolproof secure? Both are owned by Google and Apple, there are some drawbacks. But tinkering about what if and what not is not my business. It does the job and if someone really wants to hack me, it's not that SSH app on my phone that will prevent him or her.

Programs break, like humans, this is just a way of giving a quick aspirine shot when I am not in front of my computer, which happens seldomly, but still.

I like the fact that when I wake up, i can message my server "start_tests with some new parameter" and he does the job while I enjoy my coffee. Cronjobs have to be defined beforehand, this is meant to be dynamic.

Don't allow shell access if you don't want.

I'm actually not in the camp which is saying SSH on your phone is a bad idea because the NSA can log into your server. I would actually advocate for using SSH from your phone, instead of this setup. My point is that for all intents and purposes, SSH will work forever. WhatsApp on the other hand, might disappear tomorrow, rendering whatever you built here useless. The crucial point is open vs. closed software and ecosystems. You're putting effort into developing something inside a walled garden which may be shut down tomorrow (or where you get kicked out tomorrow, but the end result is the same).

Support libre software! :)


EDIT: pedantry

All in all, you are absolutely right. But then, other problems breed another set of solutions. This is just one, even if not optimal. It took 3 hours in the making, tops.

There are perfectly good SSH clients for ios [1].

[1]: https://itunes.apple.com/us/app/serverauditor-ssh-shell-cons...

And even better SSH / MOSH clients for Android [1]

[1]: https://play.google.com/store/apps/details?id=com.sonelli.ju...

AFAIK, JuiceSSH is still closed-source, which means I and a lot of others won't be using it. AFAIK, there's no good ssh clients for android, only tolerable ones.

I'd love to be proven wrong about that though.

Have you read the source of connectbot? Have you compiled the version you are using yourself? If not, the version of connectbot on the play store is no different then JuiceSSH.

This. I use JuiceSSH everyday on an Android phone to remotely admin my OpenWRT router and I love it. It's quite simple and meet my needs.

Anyone knows if there has been any movement wrt an official Whatsapp server api?

The reason I'm asking this that I work with communication/payment solutions for developing countries. Whatsapp usage is quite high in our user base but as long as there is no official api I figure I can wait.

(As for why not Telegram: I like Telegram, I just got one of my extended family groups over there yesterday, the problem is that unlike Whatsapp it doesn't work on things like s40 and s60 phones which means it isn't an option everywhere.)

"Lately, I've been working on a project to automate lots of stuff on a continent wide scale... My programs sometimes fail, sometimes they work well but I need to supervise them. They are not even 6 months old."

He's deploying a project that's failing and he needs to manually restart processes on the server. He can't find a good SSH client for android, so he has his server execute commands messaged to it through WhatsApp. WhatsApp. https://en.wikipedia.org/wiki/WhatsApp#Security And he open sources it!

This is either an April fools day joke or a 14 year old

Au contraire to the "why are you replacing SSH" comments, I actually feel that this is really cool and you're on to something that's extremely interesting to certain kinds of hackish/pet projects :)

A good use-case I can actually imagine myself using on the get go is allowing our part-timers to whatsapp our bot for their roster and scheduling, or make plans to what kind of days they want to work.

The beauty of this is that any new part-timers can come and go and with a simple server/authentication system in place it can be quite useful.

Love that it can work with Telegram too since my daily operations use both Telegram and Whatsapp.

Why not just use ssh?

First line of article: "I still haven't found a decent command line app for Android/iPhone." ;)

They should try 'Prompt' for iOS, it's really very good. https://panic.com/prompt/

So I just tried Prompt. I'm a heavy ServerAuditor user; I spend much time away from real computers but have 12 windows in screen perma-open keeping a lot of "context" (coding, IRC, etc) alive for me.

It's better in some minor aspects: it's finally possible to screen -D -rr automatically upon connect; but it has an annoying top bar that can't be hidden; I use large font sizes (I'm often in shaky buses and trains) and it ends up using too much screen space in an iPad mini.

ServerAuditor is also more configurable re: fonts and colors and such, although the default font in Prompt is pretty good.

Personally I'm very happy with ConnectBot for Android. I'd like to know why he considers this a better option.

I've reviewed all the SSH clients in the Play store and I've found JuiceSSH to be the best by far. The only reason I could think to stay on ConnectBot is the added security (as it is open source). But with XPrivacy I feel the risk is managed. You should check it out!

I also like it and it is sufficient for me, I use it to make tunnels for VNC to get to a GUI on the server to get status updates (I have RAM to spare). Tasker[0] is also a nice option for doing things via SSH.


Personally: ConnectBot has weird formatting issues, problems with keyboard input, and doesn't play nice with tmux.

Ultimately it's what I use because it's the most tolerable, but I've yet to find a good Android ssh client.

Friends and people on my blog told me JuiceSSH is cool, maybe try that?

Closed source, unfortunately |:(

I'm happy with ServerAuditor, but I'll be sure to check every suggestion that comes in the comments.

Can anyone comment on the legality of this?

Whatsapp's lawyers will complain. https://github.com/venomous0x/WhatsAPI

Best to use a different protocol and avoid whatsapp.

I like the fact that WhatsApp's lawyers required the guy to preserve any digital evidence so they can use it to screw the guy later .. Yeah, let me help you screw me

Legal notices frequently tell you not to delete/shred/burn/"lose" potential evidence so that you can't later say you had no idea you were supposed to keep that stuff around. And if you did delete stuff they can try nailing you for spoliation

What happened to not being forced to incriminate yourself?

For sane remote control of servers, I've found Salt hard to beat. This is it's original purpose, and it really does a good job of managing multiple remote servers from a single interface.

Throw an interface around that, and let's talk. :)

Probably would have been easier to just fix your app to not require constant attention.

Give us paid api access please WhatsApp!

Why not use the free telegram API?

Because it doesn't work with WhatsApp

But WhatsApp is the Internet Explorer of messaging apps, only by supporting the alternatives like Telegram we will have better messaging apps in the future.

Remember when IE had around 90% of market share 10 years ago? Well, the history repeats.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact