Ssh and scp into a Vagrant box
To scp:
cd <into-vagrant-dir>
vagrant ssh-config > ./vagrant.ssh.config
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@127.0.0.1 -L 8118:localhost:8080
Copied from: http://minimul.com/ssh-and-scp-into-a-vagrant-box.html
Written by yanhaoyang
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Vagrant
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#