Bug 3115

Summary: Add --help
Product: Portable OpenSSH Reporter: Dan Jacobson <jidanni>
Component: DocumentationAssignee: Assigned to nobody <unassigned-bugs>
Status: CLOSED WONTFIX    
Severity: trivial CC: djm
Priority: P5    
Version: 8.1p1   
Hardware: Other   
OS: Linux   

Description Dan Jacobson 2020-01-27 09:33:16 AEDT
Add a --help option to all the commands, as the one non-accidental way to trigger the usage messages.

$ scp --help
$ ssh --help
etc.

Already works like
$ cat --help
except for the "unknown option" and error $? value.

$ ssh --help
unknown option -- -
usage: ssh [-46AaCfGgKkMNnqsTtVvXxYy] [-B bind_interface]
           [-b bind_address] [-c cipher_spec] [-D [bind_address:]port]
           [-E log_file] [-e escape_char] [-F configfile] [-I pkcs11]
           [-i identity_file] [-J [user@]host[:port]] [-L address]
           [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]
           [-Q query_option] [-R address] [-S ctl_path] [-W host:port]
           [-w local_tun[:remote_tun]] destination [command]
$ echo $?
255

Anyway, all other modern Unix commands have --help or -h etc. Yes, even if they have man pages.
Comment 1 Damien Miller 2020-05-29 15:06:21 AEST
Sorry, we are not going to support GNU-style long getopt options. OpenSSH comes from a different tradition.
Comment 2 Damien Miller 2021-03-04 09:52:22 AEDT
close bugs that were resolved in OpenSSH 8.5 release cycle