ssh key not correctly used in ubuntu-cloud oneiric containers

Bug #1079320 reported by Serge Hallyn
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
lxc (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

This was reported by Rintcius Blok on the lxc-users mailing list. It
works correctly with precise containers, but not oneiric (on quantal
host). To reproduce:

cat > userdata.sh << EOF
#!/bin/sh
ifconfig eth0 > /ifconfig-eth0
EOF

lxc-create -t ubuntu-cloud -n o -- --auth-key $HOME/.ssh/id_rsa.pub --userdata ~/userdata.sh -r oneiric
lxc-start -n o

Now ~ubuntu/.ssh does not exist, so you cannot
ssh -i .ssh/id_rsa. ubuntu@<container-ip-address>

Note that /var/lib/cloud/seed/nocloud-net/meta-data does have the ssh keys.

Changed in lxc (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Ben Howard (utlemming)
Revision history for this message
rintcius (j-kubuntu) wrote :

Same problem when trying with: "-r lucid"

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

This works for me now,

sudo lxc-create -t ubuntu-cloud -n x1 -- -r precise --auth-key $HOME/.ssh/id_rsa.pub

Changed in lxc (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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