automating ssh-keygen

Daniel Kahn Gillmor dkg-openssh.com at fifthhorseman.net
Tue Apr 18 04:10:31 EST 2006


Hi Doug--

On April 17, dlochart at gmail.com said:

 > I am trying to automate ssh-keygen creating keys without a
 > passphrase.

Modern versions of openssh's ssh-keygen allow you to specify a new
passphrase on the command line with the -N argument.  So:

  ssh-keygen -N '' -f ./newkey -t rsa -q

would make ./newkey (the passwordless, private key), and ./newkey.pub
(the public key).  It should return without errors in most normal
situations.  -q ("quiet") avoids printing the normal status messages
generated by ssh-keygen.

Please read the man page for ssh-keygen ("man ssh-keygen" or use the
web [0]) for more details.

hth,

	--dkg


[0] http://www.openbsd.org/cgi-bin/man.cgi?query=ssh-keygen





More information about the openssh-unix-dev mailing list