vssh
vssh copied to clipboard
when mutlitple vm are declared, doing `vssh` try to connect to box named "default"
though there's no such boxes with this name
I think it's because vagrant ssh is able to parse the primary: true
config.vm.define "dev", primary: true do |app|
and vagrant ssh-config should put an alias "default" in its output
Just ran into this too. But seeing how the ssh line is built up within the vssh shell script was enough to let me roll my own. Very handy to know how to get the benefits of vagrant up and related commands without the penalty of two or more seconds for every ssh to the vm if one is willing to call ssh directly with the vagrant config file. Thanks.
@FrankReh If convenient, could you share with us what you've came up with ? thank you :)
@allan-simon I don't know ruby and just took the lesson from vssh about how to call ssh directly with the arguments relevant to my situation. So I call ssh passing the .vagrant config file and by using the complete path to the config file, I can call a shell alias or shell script without regard to the current working directory.
$ ssh -F ~/path/to/.vagrant/ssh_config $hostname