Bug 1973 - Key generation needs user assistance when destination file already exists
Summary: Key generation needs user assistance when destination file already exists
Status: ASSIGNED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: ssh-keygen (show other bugs)
Version: 5.9p1
Hardware: All All
: P2 normal
Assignee: Oliver Ford
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-20 01:57 AEDT by Aleksey Morarash
Modified: 2020-03-08 03:33 AEDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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