First you have to SSH to your VM and install Go, which is super easy. Note that apt-get might not install the latest version of Go, see thread on Stack Overflow about installing latest version of Go.
$ ssh -p portnumber firstname.lastname@example.org
$ sudo apt-get install golang-go
You’ll be asking whether or not you’d like to participate in a program to track which packages are being installed.
To check that it’s installed, you can run: $ go version