1
votes

I'm using Vagrant 1.6.3 with phusion/baseimage as the docker provider to get going with Docker. But I have been running into this error:

The following SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed!

ssh -i /tmp/key_e8ffa02d35af2bec7aab60fe7e9df4db_0c30703c7b7126cdf4832a41b85627e5 -o Compression=yes -o ConnectTimeout=5 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p22 [email protected] 'sudo -E -H bash -l'

Stdout from the command:

boot2docker: 0.8.0
VAGRANT FENCE: 1402443935 41755
Reading package lists...
Building dependency tree...
Reading state information...


Stderr from the command:

Warning: Permanently added '172.17.0.2' (ECDSA) to the list of known hosts.
stdin: is not a tty
VAGRANT FENCE: 1402443935 88439
modprobe: ERROR: ../libkmod/libkmod.c:556 kmod_search_moddep() could not open moddep file '/lib/modules/3.13.3-tinycore64/modules.dep.bin'
E: Unable to locate package linux-image-extra-3.13.3-tinycore64
E: Couldn't find any package by regex 'linux-image-extra-3.13.3-tinycore64'

Can anyone help me out? Thanks.

1
Could this be related? github.com/mitchellh/vagrant/issues/3799Pak

1 Answers

2
votes

It seems like the problem is, that you're doing ssh to this server for the first time and ssh asks you to confirm the server's key. But since this is run from a script, the user doesn't answer it and ssh return an error code.

Option 1. I haven't used vagrant, so I'm not sure if you can ssh to this host interactively to add the key.

Option 2. Add the key manually. Usually the known_hosts file is hashed so it's not very easy to work with it can be a bit hard. You'll have to use ssh-keyscan and ssh-keygen to find the right keys. Here is a small tutorial, you can google for more.

Option 3. Use something like

yes "yes" | ssh ...

to automatically accept the offered key

Option 4. Do not require the key, like this

ssh -oStrictHostKeyChecking=no ...

P.S. I haven't tested these, so some may not work, sorry.

P.P.S. Options 3 and 4 have security problems. Options 1 and 2 are better, but still may pose security issues if you don't verify the keys.