Bug 1576 - ssh-add doesn't have --help or --version options
Summary: ssh-add doesn't have --help or --version options
Status: CLOSED WONTFIX
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: Documentation (show other bugs)
Version: 5.2p1
Hardware: Other Linux
: P2 normal
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-21 00:27 AEDT by Baron Schwartz
Modified: 2009-10-06 15:02 AEDT (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 Baron Schwartz 2009-03-21 00:27:33 AEDT
ssh-add doesn't have --help.  If I give the --help option, I can see it runs exactly as though I didn't give any options.

But if I give the -h option it complains about an illegal option and prints out the text I would expect to see from --help.

I also see no --version option and no way to get this information from the tool itself.
Comment 1 Damien Miller 2009-03-21 17:59:12 AEDT
No OpenSSH program supports --help, --version or any other --long-option. You must be confusing us with GNU software that tends to do stuff like this - we aren't.
Comment 2 Baron Schwartz 2009-03-21 22:37:52 AEDT
That doesn't match the behavior I see on my machine.

baron@kanga:~$ ssh --help
usage: ssh [-1246AaCfgKkMNnqsTtVvXxY] [-b bind_address] [-c cipher_spec]
           [-D [bind_address:]port] [-e escape_char] [-F configfile]
           [-i identity_file] [-L [bind_address:]port:host:hostport]
           [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]
           [-R [bind_address:]port:host:hostport] [-S ctl_path]
           [-w local_tun[:remote_tun]] [user@]hostname [command]
baron@kanga:~$ scp --help
usage: scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]
           [-l limit] [-o ssh_option] [-P port] [-S program]
           [[user@]host1:]file1 ... [[user@]host2:]file2
baron@kanga:~$ ssh-copy-id --help
Usage: /usr/bin/ssh-copy-id [-i [identity_file]] [user@]machine

On the other hand, ssh-agent ignores --help too.

I assume the above are all just 'syntax error' responses.  But they have the appearance of being --help responses.
Comment 3 Damien Miller 2009-03-23 13:26:45 AEDT
That behaviour is "by accident", since both those programs print usage information when they receive an unknown argument. "--help" is interpreted first as "--" and '-' is not a valid option character.

ssh-add actually does this too, but it checks whether ssh-agent is reachable first, so you may not see it.
Comment 4 Damien Miller 2009-10-06 15:02:03 AEDT
Mass move of RESOLVED bugs to CLOSED now that 5.3 is out.