Skip to main content
Table of contents

Development VM

SSH into your VM directly

Consider using vagrant ssh to SSH into your VM directly, as it’ll always do the right thing.

If you need direct access (for rsync, scp or similar), you’ll need to manually configure your SSH configuration:

  1. Run vagrant ssh-config --host dev
  2. Paste the output into your ~/.ssh/config
  3. SSH into this using ssh dev

Reverse port forwarding

If you need access to a specific port outside your VM, you can add a reverse port option when SSHing into the VM.

For example, if you have a Docker image running on your host machine on port 5678, use the following option to allow an app inside the VM to access it on port 1234:

vagrant ssh -- -R 1234:localhost:5678

This page was last reviewed on 17 November 2019. It needs to be reviewed again on 17 May 2020 by the page owner #govuk-2ndline .
This page was set to be reviewed before 17 May 2020 by the page owner #govuk-2ndline. This might mean the content is out of date.