Hi everyone, I thought I’d share a blog post I wrote recently about using Multipass as a vscode linux remote development environment. Shout out to @damdam for the idea to use cloud-init to streamline the process!
For those who just want the steps without the whole blog post:
- Install vscode and the “Remote - SSH” extension from Microsoft
- Create a new RSA key
ssh-keygen -t rsa
- Create a cloud-init YAML file named vscode.yaml containing this (replacing with your public key that you generated):
groups: - vscode runcmd: - adduser ubuntu vscode ssh_authorized_keys: - ssh-rsa <public key>
multipass launch --cloud-init vscode.yamlto create the environment with the key
- Add the host to vscode by following the prompts and entering the IP address of the instance
Let me know if there are ways you would improve this, or if you have any other thoughts or feedback.