You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
provisioner:
name: shell
log_level: 5
max_retries: 3
wait_for_retry: 30
retry_on_exit_code: # will retry if winrm is unable to connect to the ec2 instance
- -1 #Generic error during Chef execution
- 1 #Generic error during Chef execution
kitchen.yml:
driver:
name: ec2
aws_ssh_key_id: <%= ENV['AWS_SSH_KEYNAME'] %>
region: us-east-1
instance_type: <%= ENV['AWS_INSTANCE_TYPE'] %>
spot_price: <%= ENV['AWS_SPOT_PRICE'] %>
associate_public_ip: false
interface: private
subnet_id: <%= ENV['AWS_SUBNET_ID'] %>
security_group_ids: <%= ENV['AWS_SG_ID'] %>
retryable_tries: 200
shared_credentials_profile: saml
user_data: user_data_centos_8.sh
provisioner:
name: shell
log_level: 5
max_retries: 3
wait_for_retry: 30
retry_on_exit_code: # will retry if winrm is unable to connect to the ec2 instance
- -1 #Generic error during Chef execution
- 1 #Generic error during Chef execution
verifier:
name: inspec
format: documentation
reporter:
- cli
- html:./inspec_output.html
transport:
name: ssh
ssh_key: ~/.ssh/<%= ENV['AWS_SSH_KEYNAME'] %>.pem
max_wait_until_ready: 900
connect_timeout: 60
connection_retries: 10
connection_retry_sleep: 10
username: centos
platforms:
driver:
image_id: <%= ENV['AWS_AMI_ID'] %>
suites:
verifier:
inspec_tests:
- test/os_spec.rb
SSH refused then fails:
[SSH] opening connection to user@##.###.##.##<{:user_known_hosts_file=>"/dev/null", :port=>22, :compression=>false, :compression_level=>0, :keepalive=>true, :keepalive_interval=>60, :keepalive_maxcount=>3, :timeout=>15, :keys_only=>true, :keys=>["/root/.ssh/####.pem"], :auth_methods=>["publickey"], :verify_host_key=>:never, :logger=>#<Logger:0x0000000003aeb1d8 @Level=4, @progname=nil, @default_formatter=#<Logger::Formatter:0x0000000003aeb138 @datetime_format=nil>, @Formatter=nil, @logdev=#<Logger::LogDevice:0x0000000003aeb0e8 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:>, @mon_mutex=#Thread::Mutex:0x0000000003aeb020, @mon_mutex_owner_object_id=30890100, @mon_owner=nil, @mon_count=0>>, :password_prompt=>#Net::SSH::Prompt:0x0000000003aeafa8, :user=>"user"}>
[SSH] connection failed (#<Errno::ECONNREFUSED: Connection refused - connect(2) for ##.###.##.##:22>)
Waiting for SSH service on ##.###.##.##:22, retrying in 3 seconds
[SSH] opening connection to user@##.###.##.##<{:user_known_hosts_file=>"/dev/null", :port=>22, :compression=>false, :compression_level=>0, :keepalive=>true, :keepalive_interval=>60, :keepalive_maxcount=>3, :timeout=>15, :keys_only=>true, :keys=>["/root/.ssh/####.pem"], :auth_methods=>["publickey"], :verify_host_key=>:never, :logger=>#<Logger:0x0000000003aeb1d8 @Level=4, @progname=nil, @default_formatter=#<Logger::Formatter:0x0000000003aeb138 @datetime_format=nil>, @Formatter=nil, @logdev=#<Logger::LogDevice:0x0000000003aeb0e8 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:>, @mon_mutex=#Thread::Mutex:0x0000000003aeb020, @mon_mutex_owner_object_id=30890100, @mon_owner=nil, @mon_count=0>>, :password_prompt=>#Net::SSH::Prompt:0x0000000003aeafa8, :user=>"user"}>
[SSH] connection failed (#<Net::SSH::AuthenticationFailed: Authentication failed for user user@##.###.##.##>)
When attempting to SSH manually with the same key it works.
The text was updated successfully, but these errors were encountered: