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 [email protected] -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. On Wed, Sep 2, 2015 at 10:45 PM, Dragomir Radovanović <[email protected]> wrote: > I'm interested why vagrant ssh work with key and when I try to ssh > [email protected] -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 > > -- > 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 [email protected]. > 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. -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAHqq0ezEV4UmWdCpfL4Q6QA8hOqpwU2%2BzVsHYWC9N-rOUYxnMQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
