Bug 1429 - ssh -q doesn't suppress all warning messages
Summary: ssh -q doesn't suppress all warning messages
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: ssh (show other bugs)
Version: 4.7p1
Hardware: All All
: P2 trivial
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks: V_4_8
  Show dependency treegraph
 
Reported: 2008-01-10 15:56 AEDT by leanne
Modified: 2008-03-31 15:23 AEDT (History)
2 users (show)

See Also:


Attachments
a piece of code from sshd.c (457 bytes, text/plain)
2008-01-10 16:05 AEDT, leanne
no flags Details
a piece of code from sshd.c (457 bytes, text/plain)
2008-01-10 16:06 AEDT, leanne
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description leanne 2008-01-10 15:56:20 AEDT
Hi all,
 
One question, the ssh man page says the -q option suppress all warnings and diagnostics. however, the following condition still has the warning message appeared on the console:
 
#man ssh
..............
      -q   Quiet mode.  Causes all warning and diagnostic messages to be
           suppressed.

..............
 
 
# ssh -q -i ~/.ssh/id_dsa_3 sshpa3 "uname -a"
Warning: Identity file //.ssh/id_dsa_3 not accessible: No such file or directory.
 
I checked the source code that if we use "-q" option, we just set the log level to QUIET, and the above warning message is printed from the -i option
(pls see the attachment file)

Although the message appeared in the console says it's a warning, but actually it’s an error, so should we revise the message to “Error: Identity file….” Or change the man page of ssh –q option?
Comment 1 leanne 2008-01-10 16:05:43 AEDT
Created attachment 1440 [details]
a piece of code from sshd.c
Comment 2 leanne 2008-01-10 16:06:16 AEDT
Created attachment 1441 [details]
a piece of code from sshd.c
Comment 3 Darren Tucker 2008-01-15 16:50:29 AEDT
Why is this "critical"?  If the messages are bugging you, you can either set the IdentityFile to something else (eg /dev/null) or redirect stderr to /dev/null "ssh -q 2>/dev/null foo bar".
Comment 4 leanne 2008-01-15 18:18:55 AEDT
(In reply to comment #3)
> Why is this "critical"?  If the messages are bugging you, you can
> either set the IdentityFile to something else (eg /dev/null) or
> redirect stderr to /dev/null "ssh -q 2>/dev/null foo bar".

So should we revise the manual of ssh or just leave it there?
for the manual of -q option conflicts with the output.
Comment 5 Damien Miller 2008-01-20 06:14:29 AEDT
Manual revised - it now says "most" instead of "all".
Comment 6 Damien Miller 2008-03-31 15:23:39 AEDT
Fix shipped in 4.9/4.9p1 release.