
Control your server using Whatsapp - ilovefood
http://funnybretzel.com/control-your-server-using-whatsapp/
======
diggan
"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.

~~~
ilovefood
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.

~~~
mk4p
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.

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

~~~
elwell
> this sounds like a humongous kludge

We're on Hacker News, right?

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

~~~
toothbrush
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! :)

/rant

EDIT: pedantry

~~~
ilovefood
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.

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

[1]: [https://itunes.apple.com/us/app/serverauditor-ssh-shell-
cons...](https://itunes.apple.com/us/app/serverauditor-ssh-shell-
console/id549039908?mt=8)

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

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

~~~
CaptSpify
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.

~~~
gnur
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.

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

------
omarforgotpwd
"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](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

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

------
gnur
Why not just use ssh?

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

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

~~~
CaptSpify
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.

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

~~~
CaptSpify
Closed source, unfortunately |:(

------
egeozcan
Can anyone comment on the legality of this?

~~~
mkj
Whatsapp's lawyers will complain.
[https://github.com/venomous0x/WhatsAPI](https://github.com/venomous0x/WhatsAPI)

Best to use a different protocol and avoid whatsapp.

~~~
eridal
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

~~~
aroch
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

~~~
thanatropism
What happened to not being forced to incriminate yourself?

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

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

------
noja
Give us paid api access please WhatsApp!

~~~
aeno
Why not use the free telegram API?

~~~
noja
Because it doesn't work with WhatsApp

~~~
Aldo_MX
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.

