Diff between vagrant ssh and classic ssh

40 views
Skip to first unread message

Dragomir Radovanović

unread,
Sep 2, 2015, 6:45:13 AM9/2/15
to Vagrant
I'm interested why vagrant ssh work with key and when I try to ssh vag...@127.0.0.1 -p 2222 it asks for password.
I'm having trouble with that all morning. I wrote ansible playbook, but can't log to vagrantbox.

Thanks in advance 

Alvaro Miranda Aguilera

unread,
Sep 2, 2015, 7:02:41 AM9/2/15
to vagra...@googlegroups.com
Hello,

You are not using the key in that command I am afraid.

Vagrant in the latest version will create a new private key, you can
get the location with

vagrant ssh-config

then you need to use something like:

ssh vag...@127.0.0.1 -i <path/of/ssh/private/key> -p 2222

If you are using config.ssh.insert_key = false, or you are in old
Vagrant version, then you can use the Vagrant known private key

You can grant the private key from here:
https://github.com/mitchellh/vagrant/tree/master/keys

There is one in the Vagrant installation, but I won't be able to tell
you the rigth path since I don' know your OS, so better grab that one.

Hope this helps
Alvaro.
> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in violation
> of those guidelines may result in your removal from this mailing list.
>
> GitHub Issues: https://github.com/mitchellh/vagrant/issues
> IRC: #vagrant on Freenode
> ---
> You received this message because you are subscribed to the Google Groups
> "Vagrant" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to vagrant-up+...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/vagrant-up/b2e83148-b39a-46f2-a0b7-74feb0eebbdc%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Dragomir Radovanović

unread,
Sep 2, 2015, 7:56:14 AM9/2/15
to Vagrant
Yep, that helps :)


Thanks. Cheers :)
Reply all
Reply to author
Forward
0 new messages