I would like to reproduce the way Vagrant logs in to my VM within a shell script using an ssh
command, so I create an alias to my Vagrant instance.
What
If you just want to set it up so you can use normal the normal ssh commandline, as well as scp and such, you can run vagrant ssh-config
and append the output to your default ssh configuration. If you replace the line "Host default" with a more descriptive hostname, you should be good to go.
vagrant ssh-config |sed -e "s/Host default/Host my_cool_dev_box/" >> ~/.ssh/config
ssh my_cool_dev_box