Bug 1478 - ssh -V sends output to stderr instead of stdout
Summary: ssh -V sends output to stderr instead of stdout
Status: CLOSED WONTFIX
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: Documentation (show other bugs)
Version: 5.0p1
Hardware: Other Linux
: P2 normal
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-16 05:10 AEST by Lars Noodén
Modified: 2008-07-26 14:58 AEST (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 Lars Noodén 2008-06-16 05:10:31 AEST
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
Comment 1 Damien Miller 2008-06-25 15:28:58 AEST
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.
Comment 2 Damien Miller 2008-07-22 12:25:00 AEST
Mass update RESOLVED->CLOSED after release of openssh-5.1
Comment 3 Lars Noodén 2008-07-26 14:58:09 AEST
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
$