Thanks Alvaro, now it's ok. The problem is the ssh key in the vagrant's 
home. Another question. I't's possible to generate a random hostname using 
the vagrantfile?

Nicola

Il giorno mercoledì 4 febbraio 2015 21:20:44 UTC+1, Alvaro Miranda Aguilera 
ha scritto:
>
> On Thu, Feb 5, 2015 at 4:45 AM, Nicola <[email protected] <javascript:>> 
> wrote: 
> > n other unix server the connection is ok via password but not via key. 
>
> Hello: 
>
> 2 things. 
>
> A. Can be an issue with the key on the box. 
>
> check if there is a file called  .ssh/authorized_keys in the home of 
> the vagrant user, and the content is the same like this: 
>
> https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant.pub 
>
> must be 1 line. 
>
>
> then chek the permissions, usually this will fix if there is a 
> permissions issue: 
>
> chown -R vagrant:vagrant ~vagrant/.ssh/ 
> chmod -R 600 ~vagrant/.ssh/ 
> chmod 700 ~vagrant/.ssh 
>
> and try again. 
>
> If still doesn't work. 
>
> B. if you can connect with user and password you can tell vagrant to use 
> that 
>
> check this: 
> https://docs.vagrantup.com/v2/vagrantfile/ssh_settings.html 
>
> basically add to your vagrantfile: 
>
> config.ssh.password = "password" 
>
> Alvaro. 
>

-- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to