vagrant ssh not working in MobaXterm on Windows

后端 未结 5 776
臣服心动
臣服心动 2021-01-13 21:45

I have already found \"SSH to Vagrant box in Windows\" and added the git bin directory to my windows PATH. I verified that it worked by starting CMD and typing ssh

5条回答
  •  渐次进展
    2021-01-13 22:31

    Part of the trick is that I don't want to use the Windows PATH for arbitrary commands—not even for ssh, really. I want to use the versions in MobaXterm for everything. All I want is to be able to run vagrant ssh the same way I would on Linux or Mac.

    The workaround I have been using, which I found somewhere online (but can't find the page again), is:

    vagrant ssh-config > vagrant-ssh
    ssh -F vagrant-ssh default  # Works exactly the way `vagrant ssh` should
    

    "default" is the box name for a typical Vagrant environment with only a single vagrant box. If there is more than one box, replace "default" with the box name:

    ssh -F vagrant-ssh host001  # Works the way `vagrant ssh host001` would on another system
    

    This is a good workaround with minimal changes required to workflow. But I'd still like a way to get vagrant ssh working without needing the extra file in my vagrant directory.

提交回复
热议问题