Skip to content

Instantly share code, notes, and snippets.

@jordandm
Created December 8, 2011 18:30
Show Gist options
  • Select an option

  • Save jordandm/1447946 to your computer and use it in GitHub Desktop.

Select an option

Save jordandm/1447946 to your computer and use it in GitHub Desktop.
More Chef bootstrap fun!
$ knife ec2 server create "role[base-aws]" -N aws-test-01 -I ami-1b814f72 -f m1.large -G default -i certificates/chef-knife.pem -S chef-knife --ssh-user ec2-user --region us-east-1 -Z us-east-1d -V -V
DEBUG: Using configuration from /Users/jdeamattson/repos/chef-repo/.chef/knife.rb
Instance ID: i-73b1a010
Flavor: m1.large
Image: ami-1b814f72
Region: us-east-1
Availability Zone: us-east-1d
Security Groups: default
SSH Key: chef-knife
Waiting for server................
Public DNS Name: ec2-50-16-117-93.compute-1.amazonaws.com
Public IP Address: 50.16.117.93
Private DNS Name: ip-10-90-207-22.ec2.internal
Private IP Address: 10.90.207.22
Waiting for sshd......DEBUG: sshd accepting connections on ec2-50-16-117-93.compute-1.amazonaws.com, banner is SSH-2.0-OpenSSH_5.3
done
Bootstrapping Chef on ec2-50-16-117-93.compute-1.amazonaws.com
DEBUG: Looking for bootstrap template in /Library/Ruby/Gems/1.8/gems/chef-0.10.4/lib/chef/knife/bootstrap
DEBUG: Found bootstrap template in /Library/Ruby/Gems/1.8/gems/chef-0.10.4/lib/chef/knife/bootstrap
DEBUG: Adding ec2-50-16-117-93.compute-1.amazonaws.com
DEBUG: establishing connection to ec2-50-16-117-93.compute-1.amazonaws.com:22
DEBUG: connection established
INFO: negotiating protocol version
DEBUG: remote is `SSH-2.0-OpenSSH_5.3'
DEBUG: local is `SSH-2.0-Ruby/Net::SSH_2.1.4 universal-darwin11.0'
DEBUG: read 784 bytes
DEBUG: received packet nr 0 type 20 len 780
INFO: got KEXINIT from server
INFO: sending KEXINIT
DEBUG: queueing packet nr 0 type 20 len 556
DEBUG: sent 560 bytes
INFO: negotiating algorithms
DEBUG: negotiated:
* kex: diffie-hellman-group-exchange-sha1
* host_key: ssh-rsa
* encryption_server: aes128-cbc
* encryption_client: aes128-cbc
* hmac_client: hmac-sha1
* hmac_server: hmac-sha1
* compression_client: none
* compression_server: none
* language_client:
* language_server:
DEBUG: exchanging keys
DEBUG: queueing packet nr 1 type 34 len 20
DEBUG: sent 24 bytes
DEBUG: read 152 bytes
DEBUG: received packet nr 1 type 31 len 148
DEBUG: queueing packet nr 2 type 32 len 140
DEBUG: sent 144 bytes
DEBUG: read 720 bytes
DEBUG: received packet nr 2 type 33 len 700
DEBUG: queueing packet nr 3 type 21 len 20
DEBUG: sent 24 bytes
DEBUG: received packet nr 3 type 21 len 12
DEBUG: beginning authentication of `ec2-user'
DEBUG: queueing packet nr 4 type 5 len 28
DEBUG: sent 52 bytes
DEBUG: read 52 bytes
DEBUG: received packet nr 4 type 6 len 28
DEBUG: trying publickey
DEBUG: connecting to ssh-agent
DEBUG: sending agent request 1 len 52
DEBUG: received agent packet 2 len 5
DEBUG: sending agent request 11 len 0
DEBUG: received agent packet 12 len 322
DEBUG: trying publickey (03:46:cf:6c:91:32:dd:3c:07:a2:bb:22:d3:85:93:78)
DEBUG: queueing packet nr 5 type 50 len 348
DEBUG: sent 372 bytes
DEBUG: read 52 bytes
DEBUG: received packet nr 5 type 51 len 28
DEBUG: allowed methods: publickey
ERROR: all authorization methods failed (tried publickey)
WARNING: Failed to connect to ec2-50-16-117-93.compute-1.amazonaws.com -- Net::SSH::AuthenticationFailed: ec2-user@ec2-50-16-117-93.compute-1.amazonaws.com
DEBUG: /Library/Ruby/Gems/1.8/gems/net-ssh-multi-1.1/lib/net/ssh/multi/server.rb:193:in `new_session'
DEBUG: /Library/Ruby/Gems/1.8/gems/net-ssh-multi-1.1/lib/net/ssh/multi/session.rb:483:in `next_session'
DEBUG: /Library/Ruby/Gems/1.8/gems/net-ssh-multi-1.1/lib/net/ssh/multi/server.rb:138:in `session'
DEBUG: /Library/Ruby/Gems/1.8/gems/net-ssh-multi-1.1/lib/net/ssh/multi/session_actions.rb:36:in `sessions'
DEBUG: /Library/Ruby/Gems/1.8/gems/net-ssh-multi-1.1/lib/net/ssh/multi/session_actions.rb:36:in `initialize'
DEBUG: /Library/Ruby/Gems/1.8/gems/net-ssh-multi-1.1/lib/net/ssh/multi/session_actions.rb:36:in `new'
DEBUG: /Library/Ruby/Gems/1.8/gems/net-ssh-multi-1.1/lib/net/ssh/multi/session_actions.rb:36:in `sessions'
DEBUG: /Library/Ruby/Gems/1.8/gems/net-ssh-multi-1.1/lib/net/ssh/multi/session_actions.rb:36:in `map'
DEBUG: /Library/Ruby/Gems/1.8/gems/net-ssh-multi-1.1/lib/net/ssh/multi/session_actions.rb:36:in `sessions'
DEBUG: /Library/Ruby/Gems/1.8/gems/net-ssh-multi-1.1/lib/net/ssh/multi/session_actions.rb:81:in `open_channel'
DEBUG: /Library/Ruby/Gems/1.8/gems/chef-0.10.4/lib/chef/knife/ssh.rb:160:in `ssh_command'
DEBUG: /Library/Ruby/Gems/1.8/gems/chef-0.10.4/lib/chef/knife/ssh.rb:341:in `run'
DEBUG: /Library/Ruby/Gems/1.8/gems/chef-0.10.4/lib/chef/knife/bootstrap.rb:153:in `run'
DEBUG: /Library/Ruby/Gems/1.8/gems/knife-ec2-0.5.10/lib/chef/knife/ec2_server_create.rb:218:in `run'
DEBUG: /Library/Ruby/Gems/1.8/gems/chef-0.10.4/lib/chef/knife.rb:391:in `run_with_pretty_exceptions'
DEBUG: /Library/Ruby/Gems/1.8/gems/chef-0.10.4/lib/chef/knife.rb:166:in `run'
DEBUG: /Library/Ruby/Gems/1.8/gems/chef-0.10.4/lib/chef/application/knife.rb:128:in `run'
DEBUG: /Library/Ruby/Gems/1.8/gems/chef-0.10.4/bin/knife:25
DEBUG: /usr/bin/knife:19:in `load'
DEBUG: /usr/bin/knife:19
Instance ID: i-73b1a010
Flavor: m1.large
Image: ami-1b814f72
Region: us-east-1
Availability Zone: us-east-1d
Security Groups: default
SSH Key: chef-knife
Root Device Type: ebs
Root Volume ID: vol-67860b0a
Root Device Name: /dev/sda1
Root Device Delete on Terminate: true
Public DNS Name: ec2-50-16-117-93.compute-1.amazonaws.com
Public IP Address: 50.16.117.93
Private DNS Name: ip-10-90-207-22.ec2.internal
Private IP Address: 10.90.207.22
Environment: _default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment