2016-07-26 2 views
0

Mein Vagrant arbeitete letzte Nacht vollkommen in Ordnung. Ich habe gerade mal den PC auf, traf Vagabund, und dies ist das, was ich bekommen:Vagrant stecken Verbindung Zeitüberschreitung erneut versuchen (Server hat unseren Schlüssel abgelehnt)

vagrant up                  
Bringing machine 'machine1' up with 'virtualbox' provider...      
==> machine1: Checking if box 'puphpet/ubuntu1404-x64' is up to date...   
==> machine1: Clearing any previously set forwarded ports...      
==> machine1: Clearing any previously set network interfaces...     
==> machine1: Preparing network interfaces based on configuration...    
    machine1: Adapter 1: nat              
    machine1: Adapter 2: hostonly             
==> machine1: Forwarding ports...             
    machine1: 22 (guest) => 9180 (host) (adapter 1)        
    machine1: 22 (guest) => 2222 (host) (adapter 1)        
==> machine1: Running 'pre-boot' VM customizations...        
==> machine1: Booting VM...              
==> machine1: Waiting for machine to boot. This may take a few minutes...   
machine1: SSH address: 127.0.0.1:2222           
machine1: SSH username: vagrant            
machine1: SSH auth method: private key          
machine1: Warning: Remote connection disconnect. Retrying...     
machine1: Warning: Remote connection disconnect. Retrying...     
machine1: Warning: Authentication failure. Retrying...      
machine1: Warning: Authentication failure. Retrying...      
machine1: Warning: Authentication failure. Retrying...      
machine1: Warning: Authentication failure. Retrying...      
machine1: Warning: Authentication failure. Retrying...      
machine1: Warning: Authentication failure. Retrying...      
machine1: Warning: Authentication failure. Retrying...      
machine1: Warning: Authentication failure. Retrying...      

Wenn ich dies zu verbinden versucht, ich sehe:

Using username "vagrant". 
Server refused our key 
[email protected]'s password: 

Aber meine Schlüsseldatei hat nicht Veränderung. Es gibt eine ähnliche Frage Vagrant stuck connection timeout retrying, aber es gibt einen anderen Grund und es hat mir nicht geholfen.

Es gibt ssh-config

> vagrant ssh-config            
Host machine1              
HostName 127.0.0.1            
User vagrant              
Port 2222              
UserKnownHostsFile /dev/null          
StrictHostKeyChecking no           
PasswordAuthentication no          
IdentityFile "C:/puphpet/puphpet/files/dot/ssh/id_rsa"   
IdentityFile "C:/Users/alexk/.vagrant.d/insecure_private_key" 
IdentitiesOnly yes            
LogLevel FATAL             

Antwort

1

Fügen Sie die folgende Codezeile C:\HashiCorp\vagrant\embedded\gems\gems\vagrant-1.8.5\plugins\guests\linux\cap\public_key.rb:

chmod 0600 ~/.ssh/authorized_keys


Original-Block: if test -f ~/.ssh/authorized_keys; then grep -v -x -f '#{remote_path}' ~/.ssh/authorized_keys > ~/.ssh/authorized_keys.tmp mv ~/.ssh/authorized_keys.tmp ~/.ssh/authorized_keys fi

Neuer Baustein: if test -f ~/.ssh/authorized_keys; then grep -v -x -f '#{remote_path}' ~/.ssh/authorized_keys > ~/.ssh/authorized_keys.tmp mv ~/.ssh/authorized_keys.tmp ~/.ssh/authorized_keys chmod 0600 ~/.ssh/authorized_keys fi

hatte ich das gleiche Problem und fand die obige Lösung here.

Verwandte Themen