| Summary: | ssh-add no longer works with xargs | ||
|---|---|---|---|
| Product: | Portable OpenSSH | Reporter: | Micah Culpepper <micahculpepper> |
| Component: | ssh-add | Assignee: | Assigned to nobody <unassigned-bugs> |
| Status: | CLOSED INVALID | ||
| Severity: | minor | CC: | dtucker |
| Priority: | P5 | ||
| Version: | 7.4p1 | ||
| Hardware: | amd64 | ||
| OS: | Mac OS X | ||
|
Description
Micah Culpepper
2017-07-07 02:58:04 AEST
(In reply to Micah Culpepper from comment #0) > I have a small script in my bash profile to ensure my ssh keys have > been added to ssh-add. A recent update broke this. You updated from what to what? Were the old and/or new built from source from openssh.com? > Here is the command I was using: > find ~/.ssh | egrep 'id_rsa$' | xargs ssh-add -K The ssh-add we ship does not have a '-K' option. Where did you get this package? > What's weird is that this works if I don't use xargs. What's likely happening is xargs does not pass a controlling tty. Normally this would result in a X-based ssh-askpass popup asking for a password, but you don't have ssh-askpass. $ tty /dev/ttyp0 $ echo | xargs tty not a tty > The xargs approach was working before. worked with a graphic or text prompt for passphrase? > And in fact, I can even do it > all on one line and it works: works with a graphic or text prompt for passphrase? [...] > So: > - One filename at a time works. > - Multiple filename arguments works. > - Filenames coming from xargs does not work. so use a subshell instead of xargs so you retain the controlling tty: $ ssh-add `find ~/.ssh | egrep 'id_rsa$'` (or if you don't like old-school backticks): $ ssh-add $(find ~/.ssh | egrep 'id_rsa$') From the available information it looks like where ever you got your binaries from didn't include ssh-askpass and in the absence of additional information there's nothing else we can do. closing resolved bugs as of 8.6p1 release |