To do what you want you would need the livecd to have a default root password and have the livecd start sshd at boot time.
To add a default root password you will need to mount the iso image on a loop device
Code: Select all
mount -o loop livecd.iso /mnt/cdrom
You will then need to mount the cloop image which contains the live fielsystem in compressed form - you will probably need to emerge cloop first and lsmod the cloop module before you acn mount it. I'm not sure whether you can right to a mounted cloop image - never tried.
Your best bet may be to mount the cloop image and then to chroot to it. Then you can run passwd and rc-update add sshd default to set the passwd and to start sshd at boot time.
Unmount the cloop and the isoimage and hopefully your boot disk will now have a default root password and start sshd. Note this is all dependant on being able to write to a mounted cloop image.
Another option would be to emerge livecd-ng and create your own live cd or plug a keyboard and monitor into the server for the few minutes it takes to boot the cd, create a passwd and start sshd