[K12OSN] ssh key generation

Henry Burroughs hburroughs at HHPREP.ORG
Tue May 25 20:10:29 UTC 2004

(Pardon the reply formating... Evolution only copied part of the reply
off the digest.. so I had to copy-paste).


Does your application server share (ie: via NFS) the same home directory
as your login/terminal server?  If so, you shouldn't have to scp the
files to a different server.  All you would have to do is:

cat $HOME/.ssh/id_rsa.pub >> $HOME/.ssh/authorized_keys

instead of scp.  You should use >> if you wish to keep any other
authorized keys the user has, otherwise you can use a plain "cp" or
change >> to > and overwrite the file.  Now do you want to have this run
every time the user logs in, or only the first time?

Henry Burroughs

Immanuel Derks wrote:

Hi all,

I would like to know if other people who run separate application
servers over ssh have figured out an elegante solution for public key
production and distribution through a network without bothering students
with this.

It's easy to produce the keys without user intervention during login

ssh-keygen -t rsa -q -f $HOME/.ssh/id_rsa -C '' -N ''

But then the public key has to copied to the appserver like 

scp -l $USER $HOME/.ssh/id_rsa.pub appserver:$HOME/.ssh/id_rsa.pub

and this would need a passwd from the user, so does one need to agree
with the production of the known_hosts file on the client side.

Kind regards,
Immanuel Derks

More information about the K12OSN mailing list