- From: Dane Elwell <
>
- To:
- Subject: [chef] `knife ssh` to multiple servers with passphrase on key
- Date: Fri, 22 Feb 2013 19:45:00 +0000
Hello guys,
I'm having some issues using "knife ssh" with an identity file that needs to be unlocked with a passphrase.
I would expect to be prompted for the passphrase just once, but that's not happening, Instead I'm getting prompted for every server I'm trying to connect to, all at the same time. (As a side effect, this also breaks the shell until I run 'reset').
For example:
~]# knife ssh -p2020 -x root 'name:*' 'ls -a'
Enter passphrase for /var/chef/.ssh/id_rsa: Enter passphrase for /var/chef/.ssh/id_rsa: Enter passphrase for /var/chef/.ssh/id_rsa: Enter passphrase for /var/chef/.ssh/id_rsa: Enter passphrase for /var/chef/.ssh/id_rsa: Enter passphrase for /var/chef/.ssh/id_rsa: Enter passphrase for /var/chef/.ssh/id_rsa: Enter passphrase for /var/chef/.ssh/id_rsa: Enter passphrase for /var/chef/.ssh/id_rsa: Enter passphrase for /var/chef/.ssh/id_rsa: Enter passphrase for /var/chef/.ssh/id_rsa: Enter passphrase for /var/chef/.ssh/id_rsa: Enter passphrase for /var/chef/.ssh/id_rsa: Enter passphrase for /var/chef/.ssh/id_rsa:
I've tried it with -C1 but that also breaks (and negates any advantages of using knife ssh in the first place, IMO!)
~]# knife ssh -C1 -p2020 -x root 'name:*' 'ls -a'
Enter passphrase for /var/chef/.ssh/id_rsa:
Enter passphrase for /var/chef/.ssh/id_rsa: Enter passphrase for /var/chef/.ssh/id_rsa: Enter passphrase for /var/chef/.ssh/id_rsa: Enter passphrase for /var/chef/.ssh/id_rsa: Enter passphrase for /var/chef/.ssh/id_rsa: Enter passphrase for /var/chef/.ssh/id_rsa: Enter passphrase for /var/chef/.ssh/id_rsa: Enter passphrase for /var/chef/.ssh/id_rsa: Enter passphrase for /var/chef/.ssh/id_rsa: Enter passphrase for /var/chef/.ssh/id_rsa: Enter passphrase for /var/chef/.ssh/id_rsa: Enter passphrase for /var/chef/.ssh/id_rsa:
Using the -P option doesn't work as that's for the SSH session itself, not the passphrase to the key.
Any idea how I can get around this?
Thanks
Dane
- [chef] `knife ssh` to multiple servers with passphrase on key, Dane Elwell, 02/22/2013
Archive powered by MHonArc 2.6.16.