vagrant asks password at only the first time 'vagrant up' -
i made custom vagrant box centos 6.6. question why vagrant requires password when 'vagrant up' @ first time. here console log:
$ vagrant bringing machine 'ns' 'virtualbox' provider... ==> ns: clearing set forwarded ports... ==> ns: clearing set network interfaces... ==> ns: preparing network interfaces based on configuration... ns: adapter 1: nat ns: adapter 2: hostonly ==> ns: forwarding ports... ns: 22 => 2222 (adapter 1) ==> ns: running 'pre-boot' vm customizations... ==> ns: booting vm... ==> ns: waiting machine boot. may take few minutes... ns: ssh address: 127.0.0.1:2222 ns: ssh username: vagrant ns: ssh auth method: private key ns: warning: connection timeout. retrying... ns: warning: connection timeout. retrying... ns: warning: remote connection disconnect. retrying... text echoed in clear. please install highline or termios libraries suppress echoed text. vagrant@127.0.0.1's password:
as see, vagrant asks password. continues after type it. after that, vagrant never ask whenever 'vagrant up'. occurs @ first time 'vagrant up'. wonder of custom box's setting, maybe ssh, wrong don't understand problem is.
can guess possible causes?
environment: version of vagrant 1.7.2. host os ubuntu 15.04 , guest os centos 6.6.
vagrant asks password when can't login automatically. obvious reason vagrant not have required user key user vagrant. entering correct password , vagrant exchanges key. afterwards not appear anymore. key exchange manager per instance, if destroy/delete instance next time ask again login manually.
vagrant offers insecure key on github , distributed public available vagrant box packaged it. can put key executing inside machine:
wget https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant.pub -o /home/vagrant/.ssh/authorized_keys
the other way use own private key , configure vagrantfile use specific key: vagrant ssh config
vagrant recognize , exchange insecure key , exchange secure one. therefore, have set key hashicorp packer.
Comments
Post a Comment