{"action":"created","issue":{"url":"https://api.github.com/repos/mitchellh/packer/issues/2004","labels_url":"https://api.github.com/repos/mitchellh/packer/issues/2004/labels{/name}","comments_url":"https://api.github.com/repos/mitchellh/packer/issues/2004/comments","events_url":"https://api.github.com/repos/mitchellh/packer/issues/2004/events","html_url":"https://github.com/mitchellh/packer/issues/2004","id":64840795,"number":2004,"title":"SSH handshake failure not propagating","user":{"login":"dluchinienoc","id":5704215,"avatar_url":"https://avatars.githubusercontent.com/u/5704215?v=3","gravatar_id":"","url":"https://api.github.com/users/dluchinienoc","html_url":"https://github.com/dluchinienoc","followers_url":"https://api.github.com/users/dluchinienoc/followers","following_url":"https://api.github.com/users/dluchinienoc/following{/other_user}","gists_url":"https://api.github.com/users/dluchinienoc/gists{/gist_id}","starred_url":"https://api.github.com/users/dluchinienoc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dluchinienoc/subscriptions","organizations_url":"https://api.github.com/users/dluchinienoc/orgs","repos_url":"https://api.github.com/users/dluchinienoc/repos","events_url":"https://api.github.com/users/dluchinienoc/events{/privacy}","received_events_url":"https://api.github.com/users/dluchinienoc/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mitchellh/packer/labels/bug","name":"bug","color":"f7c6c7"},{"url":"https://api.github.com/repos/mitchellh/packer/labels/builder/amazon","name":"builder/amazon","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-27T19:59:29Z","updated_at":"2015-06-11T16:15:09Z","closed_at":null,"body":"An SSH authentication error is not being propagated to the \"Finished\" status:\r\n\r\n```\r\n+ /usr/bin/packer build -only=amazon-ebs -color=false base.json\r\n\r\nRunning the 'amazon-ebs' builder task\r\namazon-ebs output will be in this color.\r\n\r\n==> amazon-ebs: Inspecting the source AMI...\r\n==> amazon-ebs: Creating temporary keypair: packer 5515b3e0-8e78-fc2f-7506-4b467f43e625\r\n==> amazon-ebs: Launching a source AWS instance...\r\n    amazon-ebs: Instance ID: i-3619b5e1\r\n==> amazon-ebs: Waiting for instance (i-3619b5e1) to become ready...\r\n==> amazon-ebs: Waiting for SSH to become available...\r\n==> amazon-ebs: Error waiting for SSH: ssh: handshake failed: ssh: unable to authenticate, attempted methods [publickey none], no supported methods remain\r\n==> amazon-ebs: Terminating the source AWS instance...\r\n==> amazon-ebs: Deleting temporary keypair...\r\nBuild 'amazon-ebs' finished.\r\n\r\n==> Builds finished. The artifacts of successful builds are:\r\nFinished: SUCCESS\r\n```\r\n\r\nThe fact that Packer isn't able to connect to the machine is a problem on our end, and is not a Packer problem in and of itself. The problem is that Packer isn't realizing that there was an error and is returning status code zero (in this case shown by Jenkins as `Finished: SUCCESS`).\r\n\r\nReproducible with Packer 0.7.5 on OS X 10.9 and CentOS 6."},"comment":{"url":"https://api.github.com/repos/mitchellh/packer/issues/comments/111189661","html_url":"https://github.com/mitchellh/packer/issues/2004#issuecomment-111189661","issue_url":"https://api.github.com/repos/mitchellh/packer/issues/2004","id":111189661,"user":{"login":"catsby","id":61721,"avatar_url":"https://avatars.githubusercontent.com/u/61721?v=3","gravatar_id":"","url":"https://api.github.com/users/catsby","html_url":"https://github.com/catsby","followers_url":"https://api.github.com/users/catsby/followers","following_url":"https://api.github.com/users/catsby/following{/other_user}","gists_url":"https://api.github.com/users/catsby/gists{/gist_id}","starred_url":"https://api.github.com/users/catsby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/catsby/subscriptions","organizations_url":"https://api.github.com/users/catsby/orgs","repos_url":"https://api.github.com/users/catsby/repos","events_url":"https://api.github.com/users/catsby/events{/privacy}","received_events_url":"https://api.github.com/users/catsby/received_events","type":"User","site_admin":false},"created_at":"2015-06-11T16:15:09Z","updated_at":"2015-06-11T16:15:09Z","body":"I belive this issue to be resolved now. I used @m1keil 's example and I can't reproduce it:\r\n\r\n```console\r\n$ packer build quickstart.json\r\nvirtualbox output will be in this color.\r\n\r\n==> virtualbox: Downloading or copying Guest additions\r\n    virtualbox: Downloading or copying: file:///Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso\r\n==> virtualbox: Importing VM: /Users/clint/Desktop/boot2docker-extra-vm.ova\r\n==> virtualbox: Creating forwarded port mapping for SSH (host port 2559)\r\n==> virtualbox: Starting the virtual machine...\r\n    virtualbox: WARNING: The VM will be started in headless mode, as configured.\r\n    virtualbox: In headless mode, errors during the boot sequence or OS setup\r\n    virtualbox: won't be easily visible. Use at your own discretion.\r\n==> virtualbox: Waiting 10s for boot...\r\n==> virtualbox: Typing the boot command...\r\n==> virtualbox: Waiting for SSH to become available...\r\n==> virtualbox: Error waiting for SSH: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none password keyboard-interactive publickey], no supported methods remain\r\n==> virtualbox: Unregistering and deleting imported VM...\r\n==> virtualbox: Deleting output directory...\r\nBuild 'virtualbox' errored: Build was halted.\r\n\r\n==> Some builds didn't complete successfully and had errors:\r\n--> virtualbox: Build was halted.\r\n\r\n==> Builds finished but no artifacts were created.\r\n```\r\n\r\n@dluchinienoc can you confirm this is or is not still an issue? \r\n\r\nThanks!"}}