Go back to the main page

Ssh and scp into a Vagrant box

This article is over 2 years old. Proceed with caution.

Regards ♨ – Minimul


To scp.

  1. cd <into-vagrant-dir>
  2. vagrant ssh-config > ./vagrant.ssh.config
  3. scp -F vagrant.ssh.config default:/etc/httpd/conf.d/ssl.conf .

To run advanced ssh commands such as creating a tunnel I had no success using the formula above but instead had to use the "long hand" method.

ssh -p 2222 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ~/.vagrant.d/insecure_private_key vagrant@localhost -L 8118:localhost:8080 
Comment on this article?