I would like to make an automated script that calls
ssh-keygen and creates some pub/private keypairs that I will use later on. In principle everything works fine with....
ssh-keygen -b 2048 -t rsa -f /tmp/sshkey -q
...except that it asks me for the passphrase that would encrypt the keys. This make -at present- the automatisation difficult.
I could provide a passphrase via the command line argument
-N thepassphrase, so to keep the prompt from appearing.
Still I do not even desire to have the keys -additionally secured by encryption- and want the keypairs to be plaintext.
What is a (the best) solution to this problem?
-q option which supposedly means "quiet/silent" does still not avoid the passphrase interaction. Also I have not found something like this
ssh-keygen ...... -q --no-passphrase
Please do not start preaching about or lecture me to the pro and cons of the "missing passphrase", I am aware of that. In the interactive form (not as a script) the user can simply hit [ENTER] twice and the key will be saved as plaintext. This is what I want to achieve in a script like this:
#!/bin/bash command1 command2 var=$(command3) # this should not stop the script and ask for password ssh-kegen -b 2048 -t rsa -f /tmp/sshkey -q