// Tutorial //

How To SSH into Your VPS from the Browser with GateOne

Published on July 17, 2013
Default avatar
By Nik van der Ploeg
Developer and author at DigitalOcean.
How To SSH into Your VPS from the Browser with GateOne

About GateOne

When you're using cloud hosting, you need to be able to get to your VPS (cloud server) from anywhere, but not every computer comes equipped with an SSH terminal. The information in this tutorial will help you install GateOne, an HTML5 terminal emulator that will allow you to log into any of your DigitalOcean cloud servers from any device that has a web browser, including tablets and smartphones.

GateOne is not hard to install; if you follow these steps, you'll be up and running in no time. These instructions assume your VPS is running Ubuntu or a Debian based Linux distro, if you're running CentOS or another distro, you'll have to modify the instructions to match your package manager accordingly.

Install GateOne

To start, log into your VPS using whichever SSH client you're using. Then download the python source files for GateOne from its Github repo:

curl -L http://github.com/liftoff/GateOne/archive/master.tar.gz > ~/gateone.tar.gz

Once the download is finished, you'll need to extract your new files somewhere:

tar xvzf ~/gateone.tar.gz -C ~

GateOne's backend is written in Python. So to get it working, you'll need to install a few Python libraries that GateOne relies on. Make sure you have Python's pip utility and other Python dependencies installed first:

sudo apt-get install python-pip debhelper python-support

Now, use pip to install the required extra packages:

sudo pip install tornado stdeb

Use GateOne's setup script to create a .deb package for GateOne:

cd ~/GateOne-master
sudo python setup.py --command-packages=stdeb.command bdist_deb

Now, install the .deb package:

cd deb_dist
sudo dpkg -i gateone*.deb

Run it once so that it initiate it's config files:

cd /opt/gateone

And start the server for the first time:

sudo python gateone.py

You will see some messages flash by, wait untill you see something like:

Listening on https://*:443/

Then hit Ctrl-C to exit the server.

GateOne will by default run on port 443 (https), and will allow access only from the hostnames that it autodetects, so make sure that whatever URL you normally access, this server through is listed in GateOne's origin list:

cd /opt/gateone/settings     #GateOne's default install dir
nano 10server.conf

Find the line that starts with "origins", it should look like this (yours may have a few extra entries):

"origins": ["localhost", "127.0.0.1"],

After ths, add the URL you want to use to access the site. For example, if you want to be able to login to your VPS by going to https://www.yourdomain.com, then change the origins list to include www.yourdomain.com:

"origins": ["localhost", "127.0.0.1","www.yourdomain.com"],

Now run:

cd /opt/gateone
sudo python gateone.py

The server should start and you should be able to access it by going to https://www.YOURDOMAIN.com in your browser. (Make sure to type 'https', not 'http').

Your browser may prompt you with a scary looking red screen saying something along the lines of, "The identity of this website has not been verified." Don't worry about it, that's perfectly normal. It's because the SSL certificate that GateOne generated for you isn't signed by any signing authority. If you have a signed SSL certificate, you can edit GateOne's config to use that, but that's outside the scope of this tutorial. In the meantime, just rest assured that your connection is still fully encrypted despite your browser's warning.

If you're able to get in and log into your VPS, then let's set GateOne to start whenever the server starts:

 sudo update-rc.d gateone defaults

then, do:

service gateone restart

To close any copies of GateOne you may have started, manually restart it using your server's init scripts.

Make sure the service is up and running and you're done. Enjoy the fully secured SSH access to your cloud server from anywhere with a web browser!

Submitted by: Nik van der Ploeg

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in our Questions & Answers section, find tutorials and tools that will help you grow as a developer and scale your project or business, and subscribe to topics of interest.

Sign up
About the authors
Default avatar
Developer and author at DigitalOcean.

Still looking for an answer?

Was this helpful?

I got it working on my debian box. For installation I used the ready made .deb package that is available on GateOne github download page: https://github.com/liftoff/GateOne/downloads

The .deb package can then simply installed with sudo dpkg -i gateone*.deb

One issue I ran into was that gateone was still not able to start. It seems that there is a problem with the newer versions of tornado after version 2.2. Thus, instead of sudo pip install tornado, I used sudo pip install tornado==2.2 to force an installation of the 2.2 version.

This tutorial doesn’t work as of 3/25/2015 with Ubuntu 14.04

The issues outlined in the previous comments still hold true

You may be able to get this working with some tinkering, but this tutorial is no longer a working step-by-step guide

Now, install the .deb package:

But, there’s no .deb package generated by “sudo python setup.py --command-packages=stdeb.command bdist_deb”

@leandro.peracchi: Hmm, seems like some files are missing. Try creating an issue: <a href=“https://github.com/liftoff/GateOne/issues”>https://github.com/liftoff/GateOne/issues</a>

Hi! I have tried to follow this how to but in step “And start the server for the first time:” I cannot execute “python gateone.py” because there is no such file available (command “find / -iname gateone.py” finds nothing). Instead I have tried to just execute “gateone” but then I got the following error:

Traceback (most recent call last): File “/usr/bin/gateone”, line 9, in <module> load_entry_point(‘gateone==1.2.0’, ‘console_scripts’, ‘gateone’)() File “/usr/lib/python2.7/dist-packages/pkg_resources.py”, line 337, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File “/usr/lib/python2.7/dist-packages/pkg_resources.py”, line 2279, in load_entry_point return ep.load() File “/usr/lib/python2.7/dist-packages/pkg_resources.py”, line 1989, in load entry = import(self.module_name, globals(),globals(), [‘name’]) File “/usr/lib/pymodules/python2.7/gateone/core/server.py”, line 633, in <module> locale.load_gettext_translations(locale_dir, ‘gateone’) File “/usr/local/lib/python2.7/dist-packages/tornado/locale.py”, line 180, in load_gettext_translations for lang in os.listdir(directory): OSError: [Errno 2] No such file or directory: ‘/usr/lib/pymodules/python2.7/gateone/i18n’

Any ideas of how to finish this how to with success?

Thanks!