{"action":"created","issue":{"url":"https://api.github.com/repos/test-kitchen/kitchen-ec2/issues/129","labels_url":"https://api.github.com/repos/test-kitchen/kitchen-ec2/issues/129/labels{/name}","comments_url":"https://api.github.com/repos/test-kitchen/kitchen-ec2/issues/129/comments","events_url":"https://api.github.com/repos/test-kitchen/kitchen-ec2/issues/129/events","html_url":"https://github.com/test-kitchen/kitchen-ec2/issues/129","id":81022791,"number":129,"title":"SSH prompting password for an instance inside VPC","user":{"login":"nirmaljss","id":12467668,"avatar_url":"https://avatars.githubusercontent.com/u/12467668?v=3","gravatar_id":"","url":"https://api.github.com/users/nirmaljss","html_url":"https://github.com/nirmaljss","followers_url":"https://api.github.com/users/nirmaljss/followers","following_url":"https://api.github.com/users/nirmaljss/following{/other_user}","gists_url":"https://api.github.com/users/nirmaljss/gists{/gist_id}","starred_url":"https://api.github.com/users/nirmaljss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nirmaljss/subscriptions","organizations_url":"https://api.github.com/users/nirmaljss/orgs","repos_url":"https://api.github.com/users/nirmaljss/repos","events_url":"https://api.github.com/users/nirmaljss/events{/privacy}","received_events_url":"https://api.github.com/users/nirmaljss/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/test-kitchen/kitchen-ec2/labels/Bug","name":"Bug","color":"e25740"},{"url":"https://api.github.com/repos/test-kitchen/kitchen-ec2/labels/Feedback%20Requested","name":"Feedback Requested","color":"d4c5f9"},{"url":"https://api.github.com/repos/test-kitchen/kitchen-ec2/labels/Triaged","name":"Triaged","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-05-26T15:52:01Z","updated_at":"2015-05-29T17:45:26Z","closed_at":null,"body":"I am trying to spin up an ec2 instance inside a VPC on a private subnet. Every time I run `kitchen test`, I am able to spin up the instance with the right security groups and in the right subnet range. When test-kitchen is trying to SSH on to the instance, it is asking for password. However, when I manually try to ssh (`ssh <private_ip> -i <path_to_ssh_key> -l ubuntu`) on to the machine I succeed without being prompted for a password. \r\n\r\nThe following is my .kitchen.yml file\r\n\r\n````\r\n---\r\ndriver:\r\n  name: ec2\r\n  aws_ssh_key_id: id-spanning\r\n  security_group_ids: ['sg-9....5']\r\n  region: us-east-1\r\n  availability_zone: us-east-1a\r\n  require_chef_omnibus: true\r\n  subnet_id: subnet-5...0\r\n  associate_public_ip: false\r\n  instance_type: m3.medium\r\n  interface: private\r\n\r\ntransport:\r\n  ssh_key: ~/.ssh/id-spanning.pem\r\n  connection_timeout: 10\r\n  connection_retries: 5\r\n  username: ubuntu\r\n\r\nprovisioner:\r\n  name: chef_solo\r\n\r\nplatforms:\r\n  - name: Ubuntu-14.04\r\n    driver:\r\n      image_id: ami-8821cae0\r\n\r\nsuites:\r\n  - name: default\r\n    run_list:\r\n    attributes:\r\n````\r\n\r\nI have the aws credentials in place on the environment variables. The following is my output.\r\n\r\n````\r\nkitchen test\r\n-----> Starting Kitchen (v1.4.0)\r\n-----> Cleaning up any prior instances of <default-Ubuntu-1404>\r\n-----> Destroying <default-Ubuntu-1404>...\r\n       EC2 instance <i-16f468c6> destroyed.\r\n       Finished destroying <default-Ubuntu-1404> (0m1.90s).\r\n-----> Testing <default-Ubuntu-1404>\r\n-----> Creating <default-Ubuntu-1404>...\r\n       Creating <>...\r\nIf you are not using an account that qualifies under the AWS\r\nfree-tier, you may be charged to run these suites. The charge\r\nshould be minimal, but neither Test Kitchen nor its maintainers\r\nare responsible for your incurred costs.\r\n\r\n       Instance <i-8fad345f> requested.\r\n       EC2 instance <i-8fad345f> created.\r\n       Waited 0/300s for instance <i-8fad345f> to become ready.\r\n       Waited 5/300s for instance <i-8fad345f> to become ready.\r\n       Waited 10/300s for instance <i-8fad345f> to become ready.\r\n       Waited 15/300s for instance <i-8fad345f> to become ready.\r\n       Waited 20/300s for instance <i-8fad345f> to become ready.\r\n       Waited 25/300s for instance <i-8fad345f> to become ready.\r\n       EC2 instance <i-8fad345f> ready.\r\nPassword: \r\n````\r\n\r\nI tried several times and haven't had any luck on bypassing the password to allow test-kitchen to ssh on to the instance. The following is my `kitchen diagnose` output.\r\n\r\n````\r\n---\r\ntimestamp: 2015-05-26 15:34:29 UTC\r\nkitchen_version: 1.4.0\r\ninstances:\r\n  default-Ubuntu-1404:\r\n    platform:\r\n      os_type: unix\r\n      shell_type: bourne\r\n    state_file:\r\n      hostname: ''\r\n      server_id: i-1.....6\r\n    driver:\r\n      associate_public_ip: false\r\n      availability_zone: us-east-1a\r\n      aws_access_key_id: \r\n      aws_secret_access_key: \r\n      aws_session_token: \r\n      aws_ssh_key_id: id-spanning\r\n      block_device_mappings: \r\n      ebs_optimized: false\r\n      flavor_id: \r\n      iam_profile_name: \r\n      image_id: ami-8821cae0\r\n      instance_type: m3.medium\r\n      interface: private\r\n      kitchen_root: \"/Users/jonnas2/Desktop/apache101\"\r\n      log_level: :info\r\n      name: ec2\r\n      price: \r\n      private_ip_address: \r\n      region: us-east-1\r\n      retryable_sleep: 5\r\n      retryable_tries: 60\r\n      security_group_ids:\r\n      - sg-9....5\r\n      shared_credentials_profile: \r\n      subnet_id: subnet-5....0\r\n      tags:\r\n        created-by: test-kitchen\r\n      test_base_path: \"/Users/jonnas2/Desktop/apache101/test/integration\"\r\n      user_data: \r\n      username: \r\n    provisioner:\r\n      attributes: {}\r\n      chef_metadata_url: \r\n      chef_omnibus_install_options: \r\n      chef_omnibus_root: \"/opt/chef\"\r\n      chef_omnibus_url: https://www.chef.io/chef/install.sh\r\n      chef_solo_path: \"/opt/chef/bin/chef-solo\"\r\n      clients_path: \r\n      cookbook_files_glob: README.*,metadata.{json,rb},attributes/**/*,definitions/**/*,files/**/*,libraries/**/*,providers/**/*,recipes/**/*,resources/**/*,templates/**/*\r\n      data_bags_path: \r\n      data_path: \r\n      encrypted_data_bag_secret_key_path: \r\n      environments_path: \r\n      http_proxy: \r\n      https_proxy: \r\n      kitchen_root: \"/Users/jonnas2/Desktop/apache101\"\r\n      log_file: \r\n      log_level: :info\r\n      name: chef_solo\r\n      nodes_path: \r\n      require_chef_omnibus: true\r\n      roles_path: \r\n      root_path: \"/tmp/kitchen\"\r\n      run_list: []\r\n      solo_rb: {}\r\n      sudo: true\r\n      sudo_command: sudo -E\r\n      test_base_path: \"/Users/jonnas2/Desktop/apache101/test/integration\"\r\n    transport:\r\n      compression: zlib\r\n      compression_level: 6\r\n      connection_retries: 5\r\n      connection_retry_sleep: 1\r\n      connection_timeout: 10\r\n      keepalive: true\r\n      keepalive_interval: 60\r\n      kitchen_root: \"/Users/jonnas2/Desktop/apache101\"\r\n      log_level: :info\r\n      max_wait_until_ready: 600\r\n      name: ssh\r\n      port: 22\r\n      ssh_key: \"/Users/jonnas2/.ssh/id-spanning.pem\"\r\n      test_base_path: \"/Users/jonnas2/Desktop/apache101/test/integration\"\r\n      username: ubuntu\r\n    verifier:\r\n      busser_bin: \"/tmp/verifier/bin/busser\"\r\n      http_proxy: \r\n      https_proxy: \r\n      kitchen_root: \"/Users/jonnas2/Desktop/apache101\"\r\n      log_level: :info\r\n      name: busser\r\n      root_path: \"/tmp/verifier\"\r\n      ruby_bindir: \"/opt/chef/embedded/bin\"\r\n      sudo: true\r\n      sudo_command: sudo -E\r\n      suite_name: default\r\n      test_base_path: \"/Users/jonnas2/Desktop/apache101/test/integration\"\r\n      version: busser\r\n````\r\n\r\nAny help would be greatly appreciated. Thanks.\r\n"},"comment":{"url":"https://api.github.com/repos/test-kitchen/kitchen-ec2/issues/comments/106883988","html_url":"https://github.com/test-kitchen/kitchen-ec2/issues/129#issuecomment-106883988","issue_url":"https://api.github.com/repos/test-kitchen/kitchen-ec2/issues/129","id":106883988,"user":{"login":"tyler-ball","id":2481463,"avatar_url":"https://avatars.githubusercontent.com/u/2481463?v=3","gravatar_id":"","url":"https://api.github.com/users/tyler-ball","html_url":"https://github.com/tyler-ball","followers_url":"https://api.github.com/users/tyler-ball/followers","following_url":"https://api.github.com/users/tyler-ball/following{/other_user}","gists_url":"https://api.github.com/users/tyler-ball/gists{/gist_id}","starred_url":"https://api.github.com/users/tyler-ball/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tyler-ball/subscriptions","organizations_url":"https://api.github.com/users/tyler-ball/orgs","repos_url":"https://api.github.com/users/tyler-ball/repos","events_url":"https://api.github.com/users/tyler-ball/events{/privacy}","received_events_url":"https://api.github.com/users/tyler-ball/received_events","type":"User","site_admin":false},"created_at":"2015-05-29T17:45:26Z","updated_at":"2015-05-29T17:45:26Z","body":"Great!  I'll leave this open so we can track the following TODOs:\r\n\r\n- [ ] Release TK master\r\n- [ ] Make sure the version constraints in kitchen-ec2 will pick up the newly released version in the ChefDK builds and via `bundle update`"}}