How to retrieve the port of a vagrant instance? -


vagrant instances setup ssh servers variable ports (depending on next available - , possilby other conditions) when they're initialized. port can retrieved vagrant ssh-config, there's no way retrieve port without parsing output. how parse output reliably?

i created a feature request vagrant solve within vagrant.

running

vagrant ssh-config | grep port | cut -d ' ' -f 4 

works


Comments