Ask Your Question

Revision history [back]

Adding a bit more to dudeofthestick's answer. Yes you should remove the "/" from there( while publishing the answer, having # in front of any line makes it bold so to suppress it he used the / infront )

cat > my-user-data <<eof< p="">

#cloud-config

password: mysecret

chpasswd: { expire: False }

ssh_pwauth: True

EOF

Once that is done launch the VM using

kvm -net nic -net user -hda disk.qcow2 -hdb my-user-data -m 512

Now login with myscreat as password and create your own user( as to login with default user all the time, we have to seed the mysecret all the time ) and set the password for that user. Now every time you login you can login through the user you have added.