| Summary: | ssh -V sends output to stderr instead of stdout | ||
|---|---|---|---|
| Product: | Portable OpenSSH | Reporter: | Lars Noodén <lars.nooden> |
| Component: | Documentation | Assignee: | Assigned to nobody <unassigned-bugs> |
| Status: | CLOSED WONTFIX | ||
| Severity: | normal | CC: | djm |
| Priority: | P2 | ||
| Version: | 5.0p1 | ||
| Hardware: | Other | ||
| OS: | Linux | ||
I'm not sure why you consider this a bug. The man page documents '-V' as "displaying" the version number and doesn't make any statements as to which stdio channel it is sent. Mass update RESOLVED->CLOSED after release of openssh-5.1 Still seems to be present in v 5.1:
$ ssh -V > x;echo ---;cat x;wc -l x
OpenSSH_5.1, OpenSSL 0.9.7j 04 May 2006
---
0 x
$ ssh -V >x 2>&1 ;echo ---;cat x;wc -l x
---
OpenSSH_5.1, OpenSSL 0.9.7j 04 May 2006
1 x
$
|
The Version number is sent to stderr instead of stdout. The behavior can be duplicated on several platforms: OpenBSD 4.3 GENERIC.MP#0 amd64: $ ssh -V >x 2>&1 ;echo ---;cat x;wc -l x --- OpenSSH_5.0, OpenSSL 0.9.7j 04 May 2006 1 x $ ssh -V > x;cat x;wc -l x OpenSSH_5.0, OpenSSL 0.9.7j 04 May 2006 0 x Linux 2.6.24-18-generic #1 SMP Wed May 28 19:28:38 UTC 2008 x86_64 $ ssh -V >x 2>&1 ;echo ---;cat x;wc -l x --- OpenSSH_4.7p1 Debian-8ubuntu1.2, OpenSSL 0.9.8g 19 Oct 2007 1 x $ ssh -V >x ;echo ---;cat x;wc -l x OpenSSH_4.7p1 Debian-8ubuntu1.2, OpenSSL 0.9.8g 19 Oct 2007 --- 0 x OpenBSD 4.2 GENERIC#3 i386 $ ssh -V >x 2>&1 ;echo ---;cat x;wc -l x --- OpenSSH_4.7, OpenSSL 0.9.7j 04 May 2006 1 x $ ssh -V >x ;echo ---;cat x;wc -l x OpenSSH_4.7, OpenSSL 0.9.7j 04 May 2006 --- 0 x Linux 2.6.21.3 #5 SMP Thu Feb 14 14:55:36 EST 2008 i686 GNU/Linux $ ssh -V >x 2>&1 ;echo ---;cat x;wc -l x --- OpenSSH_4.6p1-hpn12v17, OpenSSL 0.9.7d 17 Mar 2004 1 x $ ssh -V > x ; echo --- ; cat x ; wc -l x OpenSSH_4.6p1-hpn12v17, OpenSSL 0.9.7d 17 Mar 2004 --- 0 x OpenBSD 4.3 GENERIC#698 i386 $ ssh -V >x 2>&1 ;echo ---;cat x;wc -l x --- OpenSSH_4.8, OpenSSL 0.9.7j 04 May 2006 1 x