[K12OSN] ssh not working
Eduardo Robles Elvira
edulix at andaluciajunta.es
Sat Mar 20 19:04:13 UTC 2004
Hi people:
I'm very happy because I've finally got working local devices in my
terminals!! However, this is my test bed installation at home; I'll write a
success howto taking notes about the steps I've executed when I configure
local devices in the production server.
Now, thanks to supermount I can read the local cdrom devices of the LTSP
terminals. Moreover, they're mounted/unmounted in demand (that is supermount
behaviour). However, I cannot access them in my X terminal, because Xterminal
are running in the LTSP server (but being displayed in the LTTSP terminal
screen).
The howto I'm basing on [1] fix this problem mounting the /tmp/mnt directory
with LUFS [2] via SSH. And SSH is being problematic here, because instead of
letting me to access to a remote shell to the terminal, it asks me for a
password. I've tried $ ssh edulix uptime and I'm firstly asked if that server
is trusted, then for a password.
The script /usr/local/bin/termstart.sh is executed wherever a user logins in
the LTSP terminal graphically (gdm) and it manages the SSH public/private
keys and then tries to mount the /tm/mnt directory of the LTSP terminal as
explained before. Actually, as the X terminal is running in the server, the
user is logining in and using the LTSP server.
As you can see, what the script do is slightly different from what is
explained in [3]. I'd like to figure out which is the problem, then what
could the solution be.
Normaly, the ~/.ssh/id_rsa.pub file is in the SSH client home directory of the
user using ssh (that SSH client is in our case the LTSP server), and the
~/.ssh/authorized_keys2 file is in the SSH server home directory of the user
the ssh client is trying to connect to (that SSH server is in our case the
LTSP terminal).
------------------------------- (/usr/local/bin/termstart.sh):
#!/bin/sh
TERMINAL=`echo $DISPLAY | cut -d: -f1`
echo TERMINAL: $TERMINAL > $HOME/.termlog
echo USER: $USER >> $HOME/.termlog
echo ------------------------
if [ $TERMINAL ]; then
if [ -e $HOME/.ssh/id_rsa ]; then
rm -f $HOME/.ssh/id_rsa
rm -f $HOME/.ssh/authorized_keys2
echo $HOME/.ssh/id_rsa exists - Deleting... >> $HOME/.termlog
fi
if [ ! -d $HOME/mnt ]; then
echo $HOME/mnt doesnt exists - Creating... >> $HOME/.termlog
mkdir $HOME/mnt
else
echo $HOME/mnt exists... >> $HOME/.termlog
fi
ssh-keygen -q -t rsa -f $HOME/.ssh/id_rsa -P ''
cp -p $HOME/.ssh/id_rsa.pub $HOME/.ssh/authorized_keys2
chmod 700 $HOME/.ssh/
chmod 600 $HOME/.ssh/authorized_keys2
lufsmount -O --dmask=644 --fmask=755 --opts=sync
sshfs://$USER@$TERMINAL/tmp/mnt ~/mnt 2>> $HOME/.termlog | echo "lufsmount
finnished abnormally" >> $HOME/.termlog
fi
echo All termstart done... >> $HOME/.termlog
exit
------------------------------- (EOF)
But I think that the termstart.sh script is a bit strange as it doesn't
differentiates between SSH client and SSH server home directories!
- What could I do in order to success in that lufsmount??
- Maybe the LTSP terminal should have mounted the /home directory of the
server into its own /home directory, and I also should have added the users I
have in the LTSP server to the LTSP client user list because it seems that
it's trying to login in the ssh server into a user whose name is equal to the
user of the ssh client. ¿?¿?
- Maybe there is a problem with /opt/ltsp/i386/etc/ssh/sshd_config ?
- Have you got any advice or information I should know ?
Please, tell me what I should do in order to finally success with that
lufsmount everytime I log in a X terminal in a LTSP terminal. Here can see
the content of ~/.termlog.:
------------------------------- (/home/edulix/.termlog):
TERMINAL: edulix.ltsp
USER: edulix
/home/edulix/.ssh/id_rsa exists - Deleting...
/home/edulix/mnt exists...
shell-init: could not get current directory: getcwd: cannot access parent
directories: No existe el fichero o el directorio
lufsmount finnished abnormally
All termstart done...
------------------------------- (EOF)
I must mention that I haven't developed the howto I'm basing on, and I should
also mention that script was included in the howto, but I haven't contact
with the howto's author at the time. He seem to have dissapeard.
Thanks people now I'm very near to the end!
Edulix.
PD:I apologise my bad english.
[1] http://smtp.active.ee/download/ltsp4_lda_v0.2.tar.gz
[2] http://lufs.sf.net
[3] http://www.ltsp.org/ltsp-4.html#localapps
More information about the K12OSN
mailing list