When using ssh-keygen in the batch, promting the user causes hanging the script. Override option when selected causes rewriting the key without prompting.
Created attachment 1714 [details] Patch adding the override option to the ssh-keygen
Created attachment 1715 [details] The patch with changed override to overwrite Changed the word override to owerwrite in the patch. This will sound better :)
If you want to overwrite, why not just rm the key first?
The patch should prevent the program from asking in every situation. If there is an immutable key file, the rm does not delete it, and the ssh-keygen hang. Of course the output of rm can be tested but this make the whole thing complicate. The correct way is to make option(s) for overwriting(keeping) the file w/o asking the user.
Created attachment 1916 [details] Patch suitable for openssh-5.6p1