0

I'm trying to ssh to simple Vargant machine and it asks me for passphrase:

>vagrant init ubuntu/trusty32
>vagrant up
>vagrant ssh
Enter passphrase for key '.../.vagrant/machines/default/virtualbox/private_key':

This is probably due to new key generation:

==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2200
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: Warning: Connection timeout. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
    default:
    default: Vagrant insecure key detected. Vagrant will automatically replace
    default: this with a newly generated keypair for better security.
    default:
    default: Inserting generated public key within guest...
    default: Removing insecure key from the guest if its present...
    default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!

How to make new keys passwordless?

Upadate: Looks like the key is not actually protected by passphrase. I used Puttygen to generate .ppk from it and successfully connected using it to vagrant@localhost:2200.

4
  • config.ssh.insert_key = false is referenced from that PR. I haven't had a chance to verify it for myself but a google search suggests this is the workaround people are using. Commented Apr 20, 2015 at 12:54
  • 1
    @AdamTaylor nope, insecure_private_key also asks for passphrase.
    – Poma
    Commented Apr 20, 2015 at 13:29
  • possible duplicate of Vagrant SSH default key passphrase?
    – Poma
    Commented Apr 20, 2015 at 21:15
  • 1
    Turned out my question is a duplicate of stackoverflow.com/questions/29452656/…. I found a solution and posted it there.
    – Poma
    Commented Apr 20, 2015 at 21:16

1 Answer 1

1

The problem was caused by OpenSSH rejecting my key file due to too open permissions. Also to troubleshoot any Vagrant command use --debug key.

Not the answer you're looking for? Browse other questions tagged or ask your own question.