Running ssh-keygen without human interaction?
By David Jones •
Would it be possible to run ssh-keygen without human interaction?
I have a shell script that takes care of server deployment from start to finish, but ssh-keygen is the only remaining piece that still requires my input.
Would it be possible to feed the parameters to it? Or is there something similar to debconf-set-selections that could be used for this?
*running Debian
3 Answers
You can do more or less anything with command-line arguments. Is there something particular you want to do which doesn't appear in the man page?
wry@onyx:~$ ssh-keygen -t dsa -N "my passphrase" -C "test key" -f mykey
Generating public/private dsa key pair.
Your identification has been saved in mykey.
Your public key has been saved in mykey.pub.
The key fingerprint is:
2f:17:a4:5d:6f:25:d7:5a:0e:84:be:af:ee:52:8b:42 test key(the rest snipped for brevity)
5In case of server deployment:
ssh-keygen -t rsa -q -f "$HOME/.ssh/id_rsa" -N ""In terms of communication from server installed to git repositories or other servers would be easy.
operacao@ubuntu:~$ ssh-keygen -t dsa 1 More in general
"Zoraya ter Beek, age 29, just died by assisted suicide in the Netherlands. She was physically healthy, but psychologically depressed. It's an abomination that an entire society would actively facilitate, even encourage, someone ending their own life because they had no hope. Th…"