Bug 1668

Summary: Add override option to ssh-keygen
Product: Portable OpenSSH Reporter: jchadima
Component: ssh-keygenAssignee: Oliver Ford <ojford>
Status: NEW ---    
Severity: normal CC: djm, jchadima, jfch, ojford
Priority: P2    
Version: 5.3p1   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch adding the override option to the ssh-keygen
none
The patch with changed override to overwrite
none
Patch suitable for openssh-5.6p1 none

Description jchadima 2009-10-30 19:23:28 AEDT
When using ssh-keygen in the batch, promting the user causes hanging the script. Override option when selected causes rewriting the key without prompting.
Comment 1 jchadima 2009-10-30 19:25:54 AEDT
Created attachment 1714 [details]
Patch adding the override option to the ssh-keygen
Comment 2 jchadima 2009-10-30 20:00:59 AEDT
Created attachment 1715 [details]
The patch with changed override to overwrite

Changed the word override to owerwrite in the patch. This will sound better :)
Comment 3 Damien Miller 2009-11-04 16:06:15 AEDT
If you want to overwrite, why not just rm the key first?
Comment 4 jchadima 2009-11-04 18:16:05 AEDT
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.
Comment 5 jchadima 2010-09-03 23:13:32 AEST
Created attachment 1916 [details]
Patch suitable for openssh-5.6p1