Last active
September 14, 2022 11:49
-
-
Save cybercypher/09034406f544e040b38bdec47effc006 to your computer and use it in GitHub Desktop.
mobaxterm and vagrant ssh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vagrant() { | |
if [[ $@ == "ssh" ]]; then | |
command vagrant ssh-config > vagrant-ssh-config && ssh -A -F vagrant-ssh-config default | |
else | |
command vagrant "$@" | |
fi | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vagrant() { | |
if [[ $1 == "ssh" ]]; then | |
BOX=default | |
if [[ ! -z "$2" ]]; then | |
BOX=$2 | |
fi | |
command vagrant ssh-config > vagrant-ssh-config && ssh -A -F vagrant-ssh-config $BOX | |
else | |
command vagrant "$@" | |
fi | |
} |
thanks
Nice solution! Works fine for single machine setup, but fails with a multimachine setup. The argument 'default' should be changed to the name of the machine you want to reach. But my bashscripting skills are a little rusty; any advice to tackle this for multimachines?
WARNING: This command has been deprecated in favor of vagrant cloud auth login
Usage: vagrant [options] []
Thanks. This just save me from more digging and diff between cygwin and mobaxterm.
By any chance, you know what is causing this behavior in mobaxterm?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nice!