Bug 3214

Summary: Man page should specify which switches are incompatible with a 'command'
Product: Portable OpenSSH Reporter: Wayne Walker <lwaynewalker>
Component: ssh-agentAssignee: Assigned to nobody <unassigned-bugs>
Status: CLOSED FIXED    
Severity: minor CC: dtucker
Priority: P5    
Version: 8.3p1   
Hardware: Other   
OS: Linux   

Description Wayne Walker 2020-09-29 10:19:22 AEST
The usage message and the man page both show that [-c | -s] [-Dd] are compatible with [command [arg ...]].

```
$ ssh-agent -D /bin/bash
usage: ssh-agent [-c | -s] [-Dd] [-a bind_address] [-E fingerprint_hash]
                 [-P provider_whitelist] [-t life] [command [arg ...]]
       ssh-agent [-c | -s] -k
$
```

The SYNOPSIS and the usage message should both be changed to show that they are incompatible.

This would have saved me hours:

usage: ssh-agent [-a bind_address] [-E fingerprint_hash] [-P provider_whitelist] [-t life] (  [-c | -s] [-Dd] | [command [arg ...]] )
       ssh-agent [-c | -s] -k
Comment 1 Darren Tucker 2020-09-29 14:53:10 AEST
We actually did that recently (https://github.com/openssh/openssh-portable/commit/00531bb42f1af17ddabea59c3d9c4b0629000d27) and it's in 8.4p1 which was released in the last couple of days.

$ ssh -V
OpenSSH_8.4, LibreSSL 3.2.2

$ ssh-agent -?
ssh-agent: unknown option -- ?
usage: ssh-agent [-c | -s] [-Dd] [-a bind_address] [-E fingerprint_hash]
                 [-P allowed_providers] [-t life]
       ssh-agent [-a bind_address] [-E fingerprint_hash] [-P allowed_providers]
                 [-t life] command [arg ...]
       ssh-agent [-c | -s] -k
Comment 2 Damien Miller 2021-03-04 09:53:21 AEDT
close bugs that were resolved in OpenSSH 8.5 release cycle