SSH on the fly with Portable Apps + vscode-remoted

This is a quick blog about using portable apps to help connect to your development environment.

The Problem

I find myself working on different computers quite often. Sometimes I’m at my desktop, sometimes I’m on my laptop, sometimes I have access to a computer in an office. So when I need to do some coding, I don’t always have the same environment and resources available to me. But what if you could replicate your workspace across many machines? What if you could login to a remote server and use vscode as though it were local?

With the power of Portable Apps and the VSCode Remote SSH extension, you can!

The Solution

Portable Apps is a platform that allows you to run applications from external drives (USB sticks or SD cards), without having to install them on each machine. Basically, it’s open-source software that turns any folder into an app launcher. With Portable Apps you can install your favourite apps (e.g., Firefox, LibreOffice, etc.) onto one USB stick and then use that stick across many different machines!

The other piece of the puzzle is the VSCode Remote SSH extension by Microsoft. This extension allows you to connect directly to remote servers from within VS Code! This way you can work with

I have been a long-time user of vscode-remoted and I love it. If you haven’t used it before, please check out the VS Code Remote Development docs. It’s also good to check out the blog post from the team that started vscode-remoted which mentions sshfs as a way to get started with remote work. It was a big improvement for me over the days of having to copy files around with scp or sftp.

The use case for this blog is when you want to connect to your development environment either on premise at work or in the cloud (i.e. AWS EC2, Azure VM, etc) and you don’t want to install anything other than Portable Apps on your laptop/desktop. You can accomplish this using Putty and Pageant as that would be the only tools installed on your machine.

Some of you may be asking why not just use WSL or WSL 2? There are a lot of reasons why but they are beyond the scope of this blog post. You should definitely try them out if you haven’t already though!

I love remote access, but I hate the setup time. It’s painful. I have found a nice little trick to get started quickly.

I am a huge fan of Portable Apps. They are super useful and allow me to work on my own personal computer or use them on other computers without having to install anything.

Portable apps are great, but they have their limitations if you want to use them with VSCode Remote SSH. You can’t connect to remote servers without a secure shell client installed locally. This is where portable apps come in handy!

You can use Putty as your ssh client and then connect to your servers from Visual Studio Code with the VSCode Remote SSH plugin!

I was thinking of writing a blog on using vscode-remote to ssh into a remote system and use vscode to do your work. I saw this tweet from someone I follow (sorry, don’t know how to tag someone in markdown) and thought it would be cool to try it out myself.

I recently started getting into ruby and have been learning about the various ruby frameworks. I’ve heard of Rails, Sinatra and now have begun using Padrino.

After setting up my development environment on my laptop, I was immediately impressed at how easy it was to create a new project with the framework’s command line tool. One thing that kept bothering me however was having to cd into my project folder every time I opened up a new terminal window. It wasn’t a huge hassle, but it was just one small step that broke my workflow every time.

I figured there had to be a better way, and after reading this article on how to setup vscode with an SSH connection, I decided to implement it on my own machine.

Leave a Reply

Your email address will not be published. Required fields are marked *