Keychain 2.7.1-1 reports error caching private keys
Chuck Hamilton
chuckh1958@gmail.com
Tue May 7 17:12:00 GMT 2019
While trying to cache my private ssh key with keychain I get the
following warning: "Can't determine fingerprint from the following
line, falling back to filename". I've left the actual line out for
privacy. It appears to be the same bug documented at
https://bbs.archlinux.org/viewtopic.php?id=194978#p1512346 several
years ago as when I added the missing lines to the
extract_fingerprints function, the warning disappeared. Below is the
full function that eliminates the warning with the new lines
highlighted between comments
cygcheck.out is attached.
extract_fingerprints() {
while read ef_line; do
case "$ef_line" in
*\ *\ [0-9a-fA-F][0-9a-fA-F]:[0-9a-fA-F][0-9a-fA-F]:*)
# Sun SSH spits out different things
depending on the type of
# key. For example:
# md5 1024
00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
/home/barney/.ssh/id_dsa(DSA)
# 2048
00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
/home/barney/.ssh/id_rsa.pub
echo "$ef_line" | cut -f3 -d' '
;;
*\ [0-9a-fA-F][0-9a-fA-F]:[0-9a-fA-F][0-9a-fA-F]:*)
# The more consistent OpenSSH format, we hope
# 1024
00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
/home/barney/.ssh/id_dsa (DSA)
echo "$ef_line" | cut -f2 -d' '
;;
# Start of new lines
*\ SHA256:[0-9a-zA-Z\+\/=]*|*\ MD5:[0-9a-zA-Z\+\/=]*)
# The new OpenSSH 6.8+ format,
# 1024
SHA256:mVPwvezndPv/ARoIadVY98vAC0g+P/5633yTC4d/wXE
/home/barney/.ssh/id_dsa (DSA)
echo "$ef_line" | cut -f2 -d' '
;;
# End of new lines
*)
# Fall back to filename. Note that
commercial ssh is handled
# explicitly in ssh_l and ssh_f, so
hopefully this rule will
# never fire.
warn "Can't determine fingerprint from
the following line, falling back to filename"
mesg "$ef_line"
basename "$ef_line" | sed 's/[ (].*//'
;;
esac
done | xargs
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygcheck.out
Type: application/octet-stream
Size: 87256 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20190507/1a79d929/attachment.obj>
-------------- next part --------------
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin
mailing list