[Bug 651698] Re: Second login to ssh_import_id in cloud-config doesn't get added to authorized_keys file
Scott Moser
smoser at canonical.com
Thu Sep 30 04:26:03 BST 2010
mathiaz's error was due to james-page keys not being considered valid by ssh-import-id.
The final hex characters in his currently uploaded keys are:
0d0a 0d0a
I think the proper fix to ssh-import-id is:
--- ssh-import-id 2010-07-22 10:02:11.000000000 -0400
+++ ssh-import-id 2010-09-29 23:18:36.956997685 -0400
@@ -68,8 +68,8 @@
validate_keys() {
# Prune blank lines, join lines that don't have a '= ',
# remove invalid characters
- sed -i -e '/^$/d' \
- -e ':join /=[ ]/!{ N; s/\n// ; b join }' \
+ sed -i -e '/^$/d' -e '/^\r/d' \
+ -e ':join /=[ ]/!{ N; s/[\n\r]// ; b join }' \
-e 's/[^a-zA-Z0-9@: .\/=+-]//g' "$1"
# Count lines
lines=$(wc -l < "${1}")
** Package changed: cloud-init (Ubuntu) => openssh (Ubuntu)
** Changed in: openssh (Ubuntu)
Importance: Undecided => Low
** Changed in: openssh (Ubuntu)
Status: New => Confirmed
--
Second login to ssh_import_id in cloud-config doesn't get added to authorized_keys file
https://bugs.launchpad.net/bugs/651698
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to openssh in ubuntu.
More information about the Ubuntu-server-bugs
mailing list