Closed hairyhenderson closed 8 years ago
@hairyhenderson there is a fallback for older OpenSSH right under that in the script: https://github.com/joyent/sdc-docker/blob/master/tools/sdc-docker-setup.sh#L121
s=$(ssh-keygen -E md5 -l -f "$sshPubKeyPath" 2> /dev/null)
if [[ $? -eq 0 ]]; then
echo "$s" | awk '{print $2}' | tr -d '\n' | cut -d: -f2-;
else
# OpenSSH version < 6.8
ssh-keygen -l -f "$sshPubKeyPath" | awk '{print $2}' | tr -d '\n';
fi
hmm, I am also able to reproduce the failure now though.
@hairyhenderson could you test with bash, bash sdc-docker-setup.sh
instead of sh sdc-docker-setup.sh
?
Fun, "If bash is invoked with the name sh, it tries to mimic the startup behavior of historical versions of sh as closely as possible, while conforming to the POSIX standard as well."
@lloydde - ah, sneaky... bash
works. I see you've got a commit to fix this so I'll leave this open until that gets merged. Thank you!
@hairyhenderson were there instructions that indicated that you should use sh? If so, we should get them fixed, as the script is unlikely to turn into a proper sh script anytime soon. sh almost works by fluke on OS X because sh is a link to bash and bash isn't that strict with sh compat.
It states to use sh at https://apidocs.joyent.com/docker/
Also in the blog posts, I'll make those changes now.
@lloydde thanks!
Jira ticket: https://smartos.org/bugview/DOCKER-442.
please also fix https://my.joyent.com/main/#!/docker/intro, stopped me in my tracks... :-(
@andrew-wharton sorry about that, I have a pull request for that joyent/piranha#3218 and the team lead, @dan-luk hopes to get it merged and hopefully online tomorrow. /cc @eviking , @tysonhom .
sdc-docker-setup.sh will now complain and give correct command to run, joyent/sdc-docker@0d9733db6e0a96b0af3b97e41098541f7d608b92 . Thanks @trentm !
Keeping open pending JPC portal fix deployed.
Closing. This has been deployed to the JPC portal.
Digging into the script, it looks like the
sshGetMD5Fingerprint
function is at fault, specifically this command:The version of ssh-keygen that I have on my Mac doesn't have a
-E
option.Based on the comment above the
sshGetMD5Fingerprint
function, it looks like this was written assuming OpenSSH 6.8 or above. This is going to be a problem for other OS X users with the default SSH client...