Bug 1973

Summary: Key generation needs user assistance when destination file already exists
Product: Portable OpenSSH Reporter: Aleksey Morarash <aleksey.morarash>
Component: ssh-keygenAssignee: Oliver Ford <ojford>
Status: ASSIGNED ---    
Severity: normal CC: ojford
Priority: P2    
Version: 5.9p1   
Hardware: All   
OS: All   

Description Aleksey Morarash 2012-01-20 01:57:39 AEDT
Compiled from source openssh-5.9p1.

When generating new key pair with ssh-keygen it will ask something like

> <filename> already exists.
> Overwrite (y/n)? 

regardless of terminal existance. Worse, there is no option to disable such behaviour.

To force file rewrite I use 'echo y' piped to ssh-keygen, but it still outputs the question.

I expected '-q' option (Silence ssh-keygen) will be able to skip such interactions.
Comment 1 Oliver Ford 2020-03-03 02:26:07 AEDT
Added pr to change this behavior for openssh-portable here: https://github.com/openssh/openssh-portable/pull/175