This thought was written using Visual Studio Code from my Surface Go, but via a SSH remote connection to my ASRock Deskmini.
Today I found this article on dev.to about someone using a Microsoft Surface Go to connect to a remote Azure instance to develop Java apps.
I thought why shouldn’t I try something similar using my Surface Go and my desktop PC? Whenever I’m on the go (on the Go), I just need to connect via the VPN to home, turn on the desktop using Wake-on-LAN and then I can use Code to remote-develop on a Linux machine with a bit better specs than my Surface Go.
All I had to do was to enable the SSH daemon on Silverblue typing these commands:
sudo systemctl enable sshd
sudo systemctl start sshd
Now I can connect from the local network at home to my desktop using SSH. To connect from the outside, I first have to dial in using a VPN.
In Visual Studio Code, I installed the Remote Development extension and entered the ssh command, which Code should use to connect. Next to SSH the extension also supports connecting to the WSL and containers.
Although I can also write posts directly on my Surface Go, because Hugo works crossplatform, or even just in a browser using the Gitea web editor, this might be a handy way for more powerful tasks, where I need more CPU power and a bigger RAM. But it’s nice to explore the features using somethings simple as my Hugo based blog.
A really cool feature is port forwarding. When I write new articles on my blog, I usually run the
hugo server command and preview the article in the browser. Without forwarding the port, I would need to add
--bind 0.0.0.0 to the
hugo server command and enter the IP of my desktop followed by the port on which Hugo listens. But with forwarding, I just enter the port I want to have forwarded and then open localhost in my browser.
The title of this thought is based on the title of the linked article. I didn’t measure how much faster it actually is.