{"action":"created","issue":{"url":"https://api.github.com/repos/chef/chef-provisioning/issues/481","labels_url":"https://api.github.com/repos/chef/chef-provisioning/issues/481/labels{/name}","comments_url":"https://api.github.com/repos/chef/chef-provisioning/issues/481/comments","events_url":"https://api.github.com/repos/chef/chef-provisioning/issues/481/events","html_url":"https://github.com/chef/chef-provisioning/issues/481","id":123545115,"number":481,"title":"ssh_gateway ignored","user":{"login":"kplimack","id":1141542,"avatar_url":"https://avatars.githubusercontent.com/u/1141542?v=3","gravatar_id":"","url":"https://api.github.com/users/kplimack","html_url":"https://github.com/kplimack","followers_url":"https://api.github.com/users/kplimack/followers","following_url":"https://api.github.com/users/kplimack/following{/other_user}","gists_url":"https://api.github.com/users/kplimack/gists{/gist_id}","starred_url":"https://api.github.com/users/kplimack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kplimack/subscriptions","organizations_url":"https://api.github.com/users/kplimack/orgs","repos_url":"https://api.github.com/users/kplimack/repos","events_url":"https://api.github.com/users/kplimack/events{/privacy}","received_events_url":"https://api.github.com/users/kplimack/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-22T19:50:21Z","updated_at":"2015-12-22T20:04:02Z","closed_at":null,"body":"I'm trying to tunnel ssh connections through a bastion host, but `ssh_gateway` seems to be ignored no matter where I try specifying it.\r\n\r\n```\r\n[5] pry(#<Chef::Provisioning::AWSDriver::Driver>)> machine_options\r\n=> #<Cheffish::MergedConfig:0x007fdc0ceb7f40\r\n @configs=\r\n  [{:convergence_options=>\r\n     {:chef_server=>{:chef_server_url=>\"chefzero://localhost:8889\", :options=>{:client_name=>\"Jakes-MacBook-Pro.local\", :signing_key_filename=>nil, :api_version=>\"0\"}},\r\n      :allow_overwrite_keys=>nil,\r\n      :source_key=>nil,\r\n      :source_key_path=>nil,\r\n      :source_key_pass_phrase=>nil,\r\n      :private_key_options=>nil,\r\n      :ohai_hints=>nil,\r\n      :public_key_path=>nil,\r\n      :public_key_format=>nil,\r\n      :admin=>nil,\r\n      :validator=>nil,\r\n      :chef_config=>nil}},\r\n   {:bootstrap_options=>\r\n     {:subnet=>\"us-east-1d-public\",\r\n      :image_id=>\"ami-68115b02\",\r\n      :key_name=>\"kplimack\",\r\n      :key_path=>\"/Users/kplimack/.ssh/kplimack-aws.pem\",\r\n      :security_group_ids=>\r\n       [<aws_security_group[default-sg-vpc] @name: \"default-sg-vpc\" @noop: nil @before: nil @params: {} @provider: nil @allowed_actions: [:nothing, :create, :destroy, :purge] @action: [:create] @updated: false @updated_by_last_action: false @supports: {} @ignore_failure: false @retries: 0 @retry_delay: 2 @source_line: \"/Users/kplimack/repos/myOrg-aws-pipeline/.chef/local-mode-cache/cache/cookbooks/myOrg-aws-pipeline/recipes/vpc_us-east-1.rb:46:in `block (2 levels) in from_file'\" @guard_interpreter: nil @default_guard_interpreter: :default @elapsed_time: 1.897933 @sensitive: false @driver: #<Chef::Provisioning::AWSDriver::Driver:0x007fdc135e89a8 @driver_url=\"aws::us-east-1\", @config={:log_location=>#<IO:<STDOUT>>, :cookbook_path=>\"/Users/kplimack/repos/myOrg-aws-pipeline/.chef/local-mode-cache/cache/cookbooks\", :force_logger=>false, :force_formatter=>false, :color=>true, :named_run_list=>nil, :log_level=>:debug, :local_mode=>true, :override_runlist=>[#<Chef::RunList::RunListItem:0x007fdc13028798 @version=nil, @type=:recipe, @name=\"myOrg-aws-pipeline::vpc_us-east-1\">], :config_file=>\"/Users/kplimack/repos/myOrg-aws-pipeline/.chef/config.rb\", :specific_recipes=>[], :chef_server_url=>\"chefzero://localhost:8889\", :repo_mode=>\"everything\", :formatters=>[], :event_handlers=>[], :node_name=>\"Jakes-MacBook-Pro.local\", :start_handlers=>[], :live_stream=>true, :chef_provisioning=>{:machine_max_wait_time=>500}, :user_valid_regex=>[/^[^-+~:,\\t\\r\\n\\f\\0]+[^:,\\t\\r\\n\\f\\0]*$/], :group_valid_regex=>[/^[^-+~:,\\t\\r\\n\\f\\0]+[^:,\\t\\r\\n\\f\\0]*$/]}, @aws_credentials=#<Chef::Provisioning::AWSDriver::Credentials:0x007fdc135e8890 @credentials={\"default\"=>{:aws_access_key_id=>\"AWS_ACCESS_KEY\", :aws_secret_access_key=>\"AWS_SECRET_KEY\"}}>, @aws_config=<AWS::Core::Configuration>, @aws_config_2={:credentials=>#<Aws::Credentials access_key_id=\"AWS_ACCESS_KEY\">, :region=>\"us-east-1\", :http_proxy=>nil, :logger=>#<MonoLogger:0x007fdc13023b80 @progname=nil, @level=0, @default_formatter=#<Logger::Formatter:0x007fdc13023c98 @datetime_format=nil>, @formatter=#<Mixlib::Log::Formatter:0x007fdc1301bed0 @datetime_format=nil>, @logdev=#<MonoLogger::LocklessLogDevice:0x007fdc13023dd8 @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDOUT>>>>, :retry_limit=>5}, @ec2=<AWS::EC2>, @ec2_client=#<Aws::EC2::Client>, @ec2_resource=#<Aws::EC2::Resource>, @route53_client=#<Aws::Route53::Client>> @chef_server: {:chef_server_url=>\"chefzero://localhost:8889\", :options=>{:client_name=>\"Jakes-MacBook-Pro.local\", :signing_key_filename=>nil, :api_version=>\"0\"}} @declared_type: :aws_security_group @cookbook_name: \"myOrg-aws-pipeline\" @recipe_name: \"vpc_us-east-1\" @vpc: #<Chef::DelayedEvaluator:0x007fdc13610d18@/Users/kplimack/repos/myOrg-aws-pipeline/.chef/local-mode-cache/cache/cookbooks/myOrg-aws-pipeline/recipes/vpc_us-east-1.rb:47> @inbound_rules: [{:port=>22..22, :protocol=>:tcp, :sources=>[\"0.0.0.0/0\"]}, {:port=>-1..-1, :protocol=>:icmp, :sources=>[\"0.0.0.0/0\"]}] @outbound_rules: [{:port=>-1..-1, :protocol=>:any, :destinations=>[\"0.0.0.0/0\"]}] @description: \"Default VPC Security Group\" @managed_entry_store: #<Chef::Provisioning::ChefManagedEntryStore:0x007fdc13b44ac8 @chef_server={:chef_server_url=>\"chefzero://localhost:8889\", :options=>{:client_name=>\"Jakes-MacBook-Pro.local\", :signing_key_filename=>nil, :api_version=>\"0\"}}> @aws_object_id: \"sg-c941afb0\">],\r\n      :associate_public_ip_address=>false,\r\n      :ssh_gateway=>\"ec2-user@BASTION_IP\"},\r\n    :machine_options=>{:ssh_username=>\"ec2-user\"},\r\n    :transport_options=>{:ssh_options=>{:proxy=>\"ec2-user@BASTION_IP\"}, :options=>{:ssh_gateway=>\"ec2-user@BASTION_IP\"}, :ssh_gateway=>\"ec2-user@BASTION_IP\"},\r\n    :ssh_gateway=>\"admin@BASTION_IP\"}],\r\n @merge_arrays={}>\r\n[6] pry(#<Chef::Provisioning::AWSDriver::Driver>)> ^D\r\n[2015-12-21T15:44:34-07:00] INFO: Executing sudo pwd on ec2-user@192.168.0.6\r\n[2015-12-21T15:44:34-07:00] DEBUG: Opening SSH connection to ec2-user@192.168.0.6 with options {:timeout=>10, :auth_methods=>[\"publickey\"], :keys_only=>true, :host_key_alias=>\"i-d0819160.AWS\"}\r\n[2015-12-21T15:44:44-07:00] DEBUG: Timed out connecting to SSH: execution expired\r\n[2015-12-21T15:44:44-07:00] DEBUG: ec2-user@192.168.0.6 unavailable: network connection failed or broke: #<Chef::Provisioning::Transport::SSH::InitialConnectTimeout: execution expired>\r\n\r\n    - waiting for nat-us-east-1d (i-d0819160 on aws::us-east-1) to be connectable (transport up and running) ...\r\n    - been waiting 0/500 -- sleeping 10 seconds for nat-us-east-1d (i-d0819160 on aws::us-east-1) to become connectable ...[2015-12-21T15:44:44-07:00] INFO: Executing sudo pwd on ec2-user@192.168.0.6\r\n[2015-12-21T15:44:44-07:00] DEBUG: Opening SSH connection to ec2-user@192.168.0.6 with options {:timeout=>10, :auth_methods=>[\"publickey\"], :keys_only=>true, :host_key_alias=>\"i-d0819160.AWS\"}\r\n^C[2015-12-21T15:44:47-07:00] FATAL: SIGINT received, stopping\r\n[2015-12-21T15:44:47-07:00] FATAL: SIGINT received, stopping\r\nrake aborted!\r\n```\r\n\r\n```\r\n      bastion = search(:node, \"name:bastion-#{zone}\").first\r\n      bastion_ipaddress = bastion['ec2']['public_ipv4']\r\n\r\n      machine \"nat-#{zone}\" do\r\n        machine_options bootstrap_options: {\r\n                          subnet: \"#{zone}-public\",\r\n                          image_id: ec2_amazon_nat_ami,\r\n                          key_name: u,\r\n                          key_path: private_key,\r\n                          security_group_ids: [security_group_default],\r\n                          associate_public_ip_address: false,\r\n                          ssh_gateway: \"#{ec2_amazon_nat_username}@#{bastion_ipaddress}\"\r\n                        },\r\n                        machine_options: {\r\n                          ssh_username: ec2_amazon_nat_username,\r\n                          ssh_gateway: \"#{ec2_amazon_nat_username}@#{bastion_ipaddress}\"\r\n                        },\r\n                        transport_options: {\r\n                          ssh_options: {\r\n                            proxy: \"#{ec2_amazon_nat_username}@#{bastion_ipaddress}\",\r\n                            ssh_gateway: \"#{ec2_amazon_nat_username}@#{bastion_ipaddress}\"\r\n                          },\r\n                          options: {\r\n                            ssh_gateway: \"#{ec2_amazon_nat_username}@#{bastion_ipaddress}\"\r\n                          },\r\n                          ssh_gateway: \"#{ec2_amazon_nat_username}@#{bastion_ipaddress}\"\r\n                        },\r\n                        ssh_gateway: \"#{ec2_debian_jessie_username}@#{bastion_ipaddress}\" # this should use ENV['AWS_USER'] once the\r\nbastion has user's keys bootstrapped\r\n      end\r\n```"},"comment":{"url":"https://api.github.com/repos/chef/chef-provisioning/issues/comments/166716942","html_url":"https://github.com/chef/chef-provisioning/issues/481#issuecomment-166716942","issue_url":"https://api.github.com/repos/chef/chef-provisioning/issues/481","id":166716942,"user":{"login":"kplimack","id":1141542,"avatar_url":"https://avatars.githubusercontent.com/u/1141542?v=3","gravatar_id":"","url":"https://api.github.com/users/kplimack","html_url":"https://github.com/kplimack","followers_url":"https://api.github.com/users/kplimack/followers","following_url":"https://api.github.com/users/kplimack/following{/other_user}","gists_url":"https://api.github.com/users/kplimack/gists{/gist_id}","starred_url":"https://api.github.com/users/kplimack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kplimack/subscriptions","organizations_url":"https://api.github.com/users/kplimack/orgs","repos_url":"https://api.github.com/users/kplimack/repos","events_url":"https://api.github.com/users/kplimack/events{/privacy}","received_events_url":"https://api.github.com/users/kplimack/received_events","type":"User","site_admin":false},"created_at":"2015-12-22T20:04:02Z","updated_at":"2015-12-22T20:04:02Z","body":"@tyler-ball do you know what I'm missing here?"}}