[linux-fai] remote login on fai client
Thomas Gebhardt
gebhardt at HRZ.Uni-Marburg.DE
Fri Jun 9 15:28:58 CEST 2000
Hi,
just managed to get a remote login on a fai client by ssh. So
I can have a look at the system during installation.
How I did it:
Install ssh on fai nfsroot. If you mount /usr from your fai server,
then you have to supply at least the /etc/ssh/* files and
/etc/init.d/ssh on the nfsroot image.
/.ssh on fai nfsroot needs to be world writable. So make a link
to /tmp:
(on fai server)
# ln -s /tmp/.ssh /usr/lib/fai/nfsroot/.ssh
sshd needs a writable pseudo tty for chown:
# rm /usr/lib/fai/nfsroot/dev/ttyp0
# ln -s /tmp/dev/ttyp0 /usr/lib/fai/nfsroot/dev/ttyp0
I use to authenticate by my RSA key rather than by password. So
I have to deposit my public key somewhere:
# mkdir -p -m 700 /usr/lib/fai/nfsroot/root/.ssh
# cp <my_public_key> /usr/lib/fai/nfsroot/root/.ssh/authorized_keys
Now modify rcS_fai to start/stop sshd:
after the line "fai_setup > >( tee -a $rcslog ) 2>&1" insert
###################
# start sshd
mkdir -m 700 /tmp/.ssh
mkdir -m 755 /tmp/dev
cp /root/.ssh/authorized_keys /tmp/.ssh
mknod -m 666 /tmp/dev/ttyp0 c 3 0
/etc/init.d/ssh start
###################
after the line "echo "rebooting now" in fai_boot() insert
###################
# stop sshd
/etc/init.d/ssh stop
###################
Now it is possible to login into the fai client for babysitting
the installation.
Happy weekend, Thomas
More information about the linux-fai
mailing list