bugzilla-daemon at bugzilla.mindrot.org
2008-Jun-15 18:13 UTC
[Bug 1477] New: ssh-keygen not reading stdin as expected
https://bugzilla.mindrot.org/show_bug.cgi?id=1477
Summary: ssh-keygen not reading stdin as expected
Classification: Unclassified
Product: Portable OpenSSH
Version: 4.7p1
Platform: ix86
OS/Version: OpenBSD
Status: NEW
Severity: normal
Priority: P2
Component: ssh-keygen
AssignedTo: unassigned-bugs at mindrot.org
ReportedBy: lars at umich.edu
I see what looks like difficulty reading stdin using ssh-keyscan:
$ ssh-keyscan -t rsa login.itd.umich.edu | ssh-keygen -l -f -
-: No such file or directory
Instead of the error message "-: No such file or directory", I would
expect the output from ssh-keyscan to be read into ssh-keygen in the
above example and the fingerprint produced as output.
Doing it in two steps works:
$ ssh-keyscan -t rsa login.itd.umich.edu >/tmp/x; \
ssh-keygen -l -f /tmp/x
# login.itd.umich.edu SSH-1.99-OpenSSH_4.6p1-hpn12v17
1024 10:4a:ec:d2:f1:38:f7:ea:0a:a0:0f:17:57:ea:a6:16
login.itd.umich.edu
Option -f filename, Filename of the key file, seems to be the right
option and '-' is the usual way of indicating stdin.
FWIW trying to used /dev/stdin directly also gives an error
$ ssh-keyscan login.itd.umich.edu | ssh-keygen -l -f /dev/stdin
# login.itd.umich.edu SSH-1.99-OpenSSH_4.6p1-hpn12v17
/dev/stdin is not a public key file.
ssh-keygen seems not to have a way to show version. This is at least
the following platforms:
OpenBSD 4.2 GENERIC#3 i386
OpenBSD 4.3 GENERIC#698 i386
Linux 2.6.24-18-generic #1 SMP x86_64
The corresponding accompanying ssh show these versions:
OpenSSH_4.7p1 Debian-8ubuntu1.2, OpenSSL 0.9.8g 19 Oct 2007
OpenSSH_4.7, OpenSSL 0.9.7j 04 May 2006
OpenSSH_4.8, OpenSSL 0.9.7j 04 May 2006
--
Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2008-Jun-15 18:17 UTC
[Bug 1477] ssh-keygen not reading stdin as expected
https://bugzilla.mindrot.org/show_bug.cgi?id=1477
Darren Tucker <dtucker at zip.com.au> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dtucker at zip.com.au
--- Comment #1 from Darren Tucker <dtucker at zip.com.au> 2008-06-16
04:16:58 ---
Try:
ssh-keyscan -t rsa login.itd.umich.edu | ssh-keygen -l -f /dev/stdin
--
Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2008-Jun-15 18:59 UTC
[Bug 1477] ssh-keygen not reading stdin as expected
https://bugzilla.mindrot.org/show_bug.cgi?id=1477 --- Comment #2 from Lars Nood?n <lars at umich.edu> 2008-06-16 04:59:16 --- The same behavior can be found on this platform and version: OpenBSD 4.3 GENERIC.MP#0 amd64 OpenSSH_5.0, OpenSSL 0.9.7j 04 May 2006 -- Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug. You are watching someone on the CC list of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2008-Jun-25 05:33 UTC
[Bug 1477] ssh-keygen not reading stdin as expected
https://bugzilla.mindrot.org/show_bug.cgi?id=1477
Damien Miller <djm at mindrot.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Version|4.7p1 |-current
Platform|ix86 |All
OS/Version|OpenBSD |All
Severity|normal |enhancement
CC| |djm at mindrot.org
--
Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2008-Jul-26 05:00 UTC
[Bug 1477] ssh-keygen not reading stdin as expected
https://bugzilla.mindrot.org/show_bug.cgi?id=1477
--- Comment #3 from Lars Nood?n <lars at umich.edu> 2008-07-26 15:00:45
---
(Hmm. I can see that replies via e-mail seem not to get piped back
into bugzilla here.)
Darren suggested a second way to produce the error:
ssh-keyscan -t rsa login.itd.umich.edu | ssh-keygen -l -f
/dev/stdin
which gives the following error
/dev/stdin is not a public key file.
--
Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2008-Jul-26 05:01 UTC
[Bug 1477] ssh-keygen not reading stdin as expected
https://bugzilla.mindrot.org/show_bug.cgi?id=1477
--- Comment #4 from Lars Nood?n <lars at umich.edu> 2008-07-26 15:01:46
---
(Hmm. I can see that replies via e-mail seem not to get piped back
into bugzilla here.)
Darren suggested a second way to produce the error:
ssh-keyscan -t rsa login.itd.umich.edu | ssh-keygen -l -f
/dev/stdin
which gives the following error
/dev/stdin is not a public key file.
It seems to be present in OpenSSH 5.1
--
Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2008-Nov-17 17:55 UTC
[Bug 1477] ssh-keygen not reading stdin as expected
https://bugzilla.mindrot.org/show_bug.cgi?id=1477
Jameson Rollins <ssh-bugzilla at finestructure.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ssh-bugzilla at finestructure.
| |net
--- Comment #5 from Jameson Rollins <ssh-bugzilla at finestructure.net>
2008-11-18 04:55:46 ---
Hello. I too would really like to see ssh-keygen be able to properly
read from stdin. It would make many of the tasks I have to do much
much easier. The current situation where input needs to be written to
an intermediate file is quite cumbersome.
It actually appears that reading of /dev/stdin may be broken, as
opposed to completely unsupported. It appears that ssh-keygen will
read from a redirection of file, but not from a pipeline:
servo:/tmp/cdtemp.laHoFb 0$ ssh-keygen -l -f id_rsa.pub
1024 23:ff:58:10:19:b6:5d:4f:c9:92:28:00:57:2c:5a:c8 id_rsa.pub (RSA)
servo:/tmp/cdtemp.laHoFb 0$ ssh-keygen -l -f /dev/stdin <id_rsa.pub
1024 23:ff:58:10:19:b6:5d:4f:c9:92:28:00:57:2c:5a:c8 /dev/stdin (RSA)
servo:/tmp/cdtemp.laHoFb 0$ cat id_rsa.pub | ssh-keygen -l -f
/dev/stdin
/dev/stdin is not a public key file.
servo:/tmp/cdtemp.laHoFb 1$
I don't understand why it would be behaving this way.
Thanks so much for such a great program.
servo:/tmp/cdtemp.laHoFb 0$ ssh -V
OpenSSH_5.1p1 Debian-3, OpenSSL 0.9.8g 19 Oct 2007
servo:/tmp/cdtemp.laHoFb 0$
--
Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2009-Feb-10 22:56 UTC
[Bug 1477] ssh-keygen not reading stdin as expected
https://bugzilla.mindrot.org/show_bug.cgi?id=1477
Alexandre Dulaunoy <a at foo.be> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |a at foo.be
--
Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.
Reasonably Related Threads
- [Bug 1477] ssh-keygen not reading stdin as expected
- [Bug 1478] New: ssh -V sends output to stderr instead of stdout
- System ACL and Samba ACL
- Re: help in R calling C function (Lei Liu)
- ssh-keygen -r should support SSHFP records for ECDSA (or at least return non-zero error code on failure)