Set up authorized_keys earlier in the boot process

Bug #370628 reported by Eric Hammond
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu on EC2
Fix Released
Undecided
Unassigned

Bug Description

When I (or an automated process) attempts to ssh to the ubuntu user right after sshd starts accepting connections, I always get "Permission denied (publickey)." If I wait a few seconds more and try again, I generally get in cleanly.

Please set up the authorized_keys file for the ubuntu user a bit earlier in the boot process.

Note: sshd seems to be started at S16. The official Ubuntu images set up authorized_keys at S90. On the Ubuntu images I build, I do the authorized_keys setup at S70ec2... and it seems to get in soon enough that my automated ssh is never rejected.

Related branches

Revision history for this message
Chuck Short (zulcss) wrote :

This is fixed for the next version of ec2-init.

Changed in ubuntu-on-ec2:
status: New → Fix Committed
Scott Moser (smoser)
Changed in ubuntu-on-ec2:
status: Fix Committed → Fix Released
Revision history for this message
Scott Moser (smoser) wrote :

verified fixed in http://ec2-images.ubuntu.com/karmic/20090811.2/ubuntu-ec2-karmic-amd64.img.gz (ec2-init 0.4.99-0ubuntu2)

ec2-init/debian/rules has:
DEB_UPDATE_RCD_PARAMS:= start 15 2 3 4 5 . stop 20 1 .

which gets the startup script run at S15 (ssh has 16).

$ dpkg-query --showformat '${version}\n' --show "ec2-init"
0.4.99-0ubuntu2
$ ls -l /etc/rc3.d/{*ec2-init,*ssh}
lrwxrwxrwx 1 root root 18 2009-08-11 12:16 /etc/rc3.d/S15ec2-init -> ../init.d/ec2-init
lrwxrwxrwx 1 root root 13 2009-08-11 12:16 /etc/rc3.d/S16ssh -> ../init.d/ssh

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.