Skip to content

Instantly share code, notes, and snippets.

@krmnn
Created July 2, 2018 13:03
Show Gist options
  • Save krmnn/eca2f9d8dc10ae8744a48cb184d9c0fc to your computer and use it in GitHub Desktop.
Save krmnn/eca2f9d8dc10ae8744a48cb184d9c0fc to your computer and use it in GitHub Desktop.
vagrant ssh
#!/bin/sh
PORT=$(vagrant ssh-config | grep Port | grep -o '[0-9]\+')
ssh -q \
-o UserKnownHostsFile=/dev/null \
-o StrictHostKeyChecking=no \
-i ~/.vagrant.d/insecure_private_key \
vagrant@localhost \
-p $PORT \
"$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment