Skip to main content
The 2024 Developer Survey results are live! See the results

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

8
  • 5
    This answer doesn't let you ssh to your Vagrant from outside the Vagrantfile directory ("using the regular ssh command"), which is how I interpreted the question.
    – sjy
    Commented Sep 4, 2014 at 2:39
  • You could set the port on your own. Thus the script will be executable from any directory.
    – Yser
    Commented Dec 15, 2014 at 12:54
  • So, what is making that port a way to get in to the machine? Where is the configuration of what port it is?
    – nroose
    Commented Oct 23, 2015 at 17:45
  • 1
    Vagrant chooses an unused one with the auto_correct: true setting. Here's more info on how to change it manually Commented Oct 23, 2015 at 17:53
  • 1
    I had to skip first line, ie. the Host entry. The modified command is: ssh $(vagrant ssh-config | awk 'NR>1 {print " -o "$1"="$2}') localhost
    – kgadek
    Commented Nov 20, 2015 at 17:49