I purchased one from e2enetworks for just Rs 744/- per month. The services they offer for decent amount are quite good. Unlimited Bandwith, 30GB SSD storage what else do you want ? I mean having unlimited bandwidth at my disposal was enough for me to go with e2enetworks. I have been playing with it for a week now and learnt/experimented a few things in the process of setting it up.

  • Get notifications on android when someone logs into VPS.
  • FTP to transfer files.

Get notifications on android when someone logs into VPS.

The e2enetworks guys asked me to generate a SSH key pair and they just added my public key to authorized_hosts on my VPS. When I logged in for the first time I noticed that there were lots of public keys over there other than mine. It is okay since they need to have access to my VPS for maintenance or during some emergency. But since I am a paranoid kind of guy I thought I should at least get notified when someone else other than me acesses root user on my VPS.

Around 2 months back I got license for Pushover android app. Pushover is a great app with which you can get customised notifications to your Android device using their API. Now I knew that login shells read .profile when someone logs into a Unix machine. So all I had to do was write a small python script that does a POST request whenever some one logs in.

Here is the script notify.py

import urllib2
import httplib, urllib


def notify(message):
    conn = httplib.HTTPSConnection("api.pushover.net:443")
    conn.request("POST", "/1/messages.json",
            urllib.urlencode({
                "token": "<token>",
                "user": "<key>",
                "message": message,
                }), {"Content-type": "application/x-www-form-urlencoded"})

notify("Hey someone logged in on root user @ VPS")

And on .profile I just added a single line at bottom.

python <path-to-notify.py>

From now on I get a notification on my Phone itself whenever someone logs in on my VPS.

FTP to transfer files

Well since I had an unlimited bandwidth at my disposal I downloaded all naruto mangas using a script I made in college. Even I was surprised that script still worked after 3 years. After downloading around 2GB of data the only problem left was to download them. Although I can easily copy them using scp but a catch was there. Since I was trying to download the data from my office and I didn't know the public IP of my machine I can't copy the files directly to my machine on my company network's.

I decided to create a FTP server on my VPS. I installed vsftpd from apt and turned off anonymous login using the config file at /etc/vsftpd.conf. The default vsftpd configuration is already very secure and it prohibits any file write to ftp directory. So I left all the other configurations intact.

Downloading the files from client side was easy using wget.

wget -r ftp://<username>:<password>@<VPS-IP>/naruto

I will soon host my blog on VPS itself, currently it is hosted on OpenShift and there are a lot of things I want to do with this VPS. A lot of ideas are there and now possibilites are endless. I am happy now :)