如何在密码短语中使用ssh-key?

时间:2015-08-13 05:45:27

标签: linux ssh vagrant ssh-keys vagrantfile

我为libvirt创建了自定义框,并为没有密码短语的流浪者生成ssh-key对。我在像

这样的流浪文件中提供私钥
config.ssh.username = "username"
config.ssh.private_key_path = "/path_to_key/id_rsa"   

运行vagrant up VM --provider=libvirt后,它运行正常,没有任何问题。 下次我再次使用pass-phrase创建新的Box和ssh-key,并且我正在运行命令vagrant up with_pass --provider=libvirt但是它没有工作,也没有要求传递短语。它停在

==> with_pass:  -- Video Type:        cirrus
==> with_pass:  -- Video VRAM:        9216
==> with_pass:  -- Keymap:            en-us
==> with_pass:  -- Command line : 
==> with_pass: Creating shared folders metadata...
==> with_pass: Starting domain.
==> with_pass: Waiting for domain to get an IP address...
==> with_pass: Waiting for SSH to become available..

我知道它需要密码,但我不知道如何给密码短语。

1 个答案:

答案 0 :(得分:-1)

如上所述:http://docs.vagrantup.com/v2/vagrantfile/ssh_settings.html

您可以使用config.ssh.password

相关问题