[K12OSN] Running remote apps on ltsp?
Petre Scheie
petre at maltzen.net
Tue Jul 20 14:36:53 UTC 2004
Here's a way to automate generating the public ssh keys for all your users.
Below is an expect script that answers the prompts to ssh-keygen:
#!/usr/bin/expect -f
#
# auto_ssh-keygen : automates ssh-keygen so you can generate public
# keys for many users
spawn ssh-keygen -t dsa
match_max 100000
expect -exact "ssh/id_dsa): "
send -- "\r"
expect -exact "Enter passphrase (empty for no passphrase): "
send -- "\r"
expect -exact "Enter same passphrase again: "
send -- "\r"
expect eof
Copy that into a file called auto_ssh-keygen, put it in, say, /usr/local/bin and
make it executable. Then you can do something like this at a prompt:
for x in `ls /home`
do
su - $x -c /usr/local/bin/auto_ssh-keygen
done
This will create a public key for each user, in his/her ~/.ssh/ directory,
called id_dsa.pub. Copy that to the user's ~/.ssh/ directory on the Solaris
box, and then you should be able to have an icon or menu selection that calls
'ssh solaris_host /path/to/staroffice'. I *think* expect is installed by
default on RH boxes, but if not, it's easy to install.
HTH
Petre
John Simovic wrote:
> Thanks Peter but I have over 1000 users so this idea is not appealing to me
> atm. Has to be another way?
> ----- Original Message -----
> From: "Petre Scheie" <petre at maltzen.net>
> To: "Support list for opensource software in schools." <k12osn at redhat.com>
> Sent: Tuesday, July 20, 2004 11:16 PM
> Subject: Re: [K12OSN] Running remote apps on ltsp?
>
>
>
>>I think you'll have to setup all the other users with ssh-with-no-password
>
> in
>
>>order for them to be able to call SO by just clicking an icon. So,
>
> perhaps this
>
>>would work (this is off the top of my head) and I think you could script
>
> it:
>
>>As root on the linux box, do for each user
>>1. su - to user
>>2. ssh-keygen -t dsa
>>3. cd .ssh/
>>4. cp id_dsa.pub authorized_keys2
>>5. repeat for next user
>>
>>Then you could nfs mount the user's home directories on the Solaris box.
>
> I
>
>>havent' tried this to verify it would work. If it doesn't, then you'd
>
> have to
>
>>replace step #4 with copying the id_dsa.pub key to
>>solaris:/home/user/.ssh/authorized_keys2.
>>
>>Or you could toss security to the wind and allow rsh and call SO via that.
>
> But
>
>>getting that set up would probably take as much work as doing it through
>
> ssh, so
>
>>you might as well take the ssh route.
>>
>>Petre
>>
>>John Simovic wrote:
>>
>>>Here is what I want to do: In icewm (on the menu bar), I would like a
>
> link
>
>>>(script) which calls StarOffice Writer for example running on another
>>>(SOlaris) server to be able to be invoked by any user who logs on to the
>>>system. How do I achieve this? SSh with no password works fine for me
>
> but
>
>>>what about for all users?
>>>
>>>Thanks in advance.
>>>
>>>
>>>
>>>_______________________________________________
>>>K12OSN mailing list
>>>K12OSN at redhat.com
>>>https://www.redhat.com/mailman/listinfo/k12osn
>>>For more info see <http://www.k12os.org>
>>>
>>
>>_______________________________________________
>>K12OSN mailing list
>>K12OSN at redhat.com
>>https://www.redhat.com/mailman/listinfo/k12osn
>>For more info see <http://www.k12os.org>
>>
>>
>
>
>
> _______________________________________________
> K12OSN mailing list
> K12OSN at redhat.com
> https://www.redhat.com/mailman/listinfo/k12osn
> For more info see <http://www.k12os.org>
>
More information about the K12OSN
mailing list