Packer: SSH connection through virtualbox-iso

Created on 13 Sep 2015  ·  3Comments  ·  Source: hashicorp/packer

Hello,

After many test I hit an issue regarding an ssh connection through virtualbox-iso :

2015/09/13 15:35:47 packer-builder-virtualbox-iso: 2015/09/13 15:35:47 [INFO] Attempting SSH connection...
2015/09/13 15:35:47 packer-builder-virtualbox-iso: 2015/09/13 15:35:47 reconnecting to TCP connection for SSH
2015/09/13 15:35:47 packer-builder-virtualbox-iso: 2015/09/13 15:35:47 handshaking with SSH
2015/09/13 15:35:47 packer-builder-virtualbox-iso: 2015/09/13 15:35:47 handshake error: ssh: handshake failed: read tcp 127.0.0.1:47320->127.0.0.1:4117: read: connection reset by peer
2015/09/13 15:35:47 packer-builder-virtualbox-iso: 2015/09/13 15:35:47 [DEBUG] SSH handshake err: ssh: handshake failed: read tcp 127.0.0.1:47320->127.0.0.1:4117: read: connection reset by peer
[...]
2015/09/13 15:36:36 packer-builder-virtualbox-iso: 2015/09/13 15:36:36 [DEBUG] Detected authentication error. Increasing handshake attempts.
2015/09/13 15:36:43 packer-builder-virtualbox-iso: 2015/09/13 15:36:43 [INFO] Attempting SSH connection...
2015/09/13 15:36:43 packer-builder-virtualbox-iso: 2015/09/13 15:36:43 reconnecting to TCP connection for SSH
2015/09/13 15:36:43 packer-builder-virtualbox-iso: 2015/09/13 15:36:43 handshaking with SSH
2015/09/13 15:36:45 packer-builder-virtualbox-iso: 2015/09/13 15:36:45 handshake error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none password], no supported methods remain
2015/09/13 15:36:45 packer-builder-virtualbox-iso: 2015/09/13 15:36:45 [DEBUG] SSH handshake err: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none password], no supported methods 

This is odd because I am able to connect through my host to my virtualbox machine during the building process :

ssh [email protected] -p 4117
The authenticity of host '[127.0.0.1]:4117 ([127.0.0.1]:4117)' can't be established.
ECDSA key fingerprint is 0a:a9:4a:0e:81:14:5d:8e:e3:00:7e:8a:9e:d3:b1:1e.
Are you sure you want to continue connecting (yes/no)? no

Best regards

bug buildevirtualbox

Most helpful comment

I think I've found the error, I need to add my user as member of the ssh group, so now it's working as expected.

From my point of view, it was my fault

All 3 comments

Very odd,

With the username & password set to vagrant in my preseed file : it works. If I add another use such as diag user account and password set to diagdiag : it doesn't work.

I don't know why it's not working with my diag user account.

Thanks for the report. I think I have seen something like this as well. It may be a bug or a spot where we need to clarify the documentation.

I think I've found the error, I need to add my user as member of the ssh group, so now it's working as expected.

From my point of view, it was my fault

Was this page helpful?
0 / 5 - 0 ratings