SSH to Google Colaboratory with Serveo.net
I love Google Colab! It is perfect for running Deep Learning experiments on a budget. I like how nonrestrictive it is and how you can run whatever you want inside the container you are given.
Sometimes I like to connect via SSH and use a proper editor to edit my python scripts, and while Jupyter-like environment is great for visualizing etc. sometimes you just want a shell. Luckily you can SSH into your Colab runtime.
Now, full disclaimer, I do not know if Google allows this explicitly or they just didn’t consider it. If I am asked to remove this guide I will immediately do so.
To get SSH access you need a bridge of some sort. There are already some tutorials using ngrok but that requires you to make an account there. What I came up with is much simpler.
Here are the steps:
Open a new Colab notebook (you can name it ssh for future use)
Set your runtime to Python 3 and GPU...





















