Bug 3180

Summary: ssh-add -d cannot take key from stdin
Product: Portable OpenSSH Reporter: Kane <kanepyork>
Component: ssh-addAssignee: Damien Miller <djm>
Status: CLOSED FIXED    
Severity: enhancement CC: djm, dtucker
Priority: P5    
Version: 8.2p1   
Hardware: Other   
OS: Linux   
Bug Depends on:    
Bug Blocks: 3162    
Attachments:
Description Flags
Implement support for "ssh-add -d -"
dtucker: ok+
regress tests dtucker: ok+

Description Kane 2020-06-11 08:22:55 AEST
The -d option to ssh-add does not accept '-' as an alias for stdin. 

$ cat id_ed25519_test | ssh-add -d -
Bad key file -: No such file or directory
Comment 1 Darren Tucker 2020-06-19 15:09:08 AEST
On most platforms you can do "cat id_ed25519_test | ssh-add -d /dev/stdin".
Comment 2 Damien Miller 2020-06-26 13:52:48 AEST
Created attachment 3416 [details]
Implement support for "ssh-add -d -"

This adds support for "ssh-add -d -". It allows multiple keys to appear on stdin, one per line. This allows handy recipes like deleting all but certificates "ssh-add -L | grep -v 'cert-v01@openssh.com' | ssh-add -d -"
Comment 3 Damien Miller 2020-06-26 15:02:06 AEST
Created attachment 3418 [details]
regress tests

regress tests for previous
Comment 4 Damien Miller 2020-06-26 15:13:09 AEST
This has been committed and will be in the openssh-8.4 release, due in a few months
Comment 5 Darren Tucker 2020-10-02 14:55:00 AEST
Mass close of all bugs fixed in 8.4 release.