Univention Bugzilla – Bug 54588
univention-ssh --help is wrong
Last modified: 2022-06-08 16:50:30 CEST
> Syntax: > univention-ssh [-timeout timeout] <pwd_file> [options] [user@]host <command> ... > Parameters: > pwd_file file containing the password > options optional options to univention-ssh ... > Options: > -timeout: timeout for operation in seconds > --no-split: don't word-split command Actually '--no-split' must be *before* <pwd_file>. Example: /usr/sbin/univention-ssh --no-split <(echo -n univention) root@localhost "univention-ldapsearch -LLL '(&(objectClass=person)(uid=$HOSTNAME\$)(!(univentionServerRole=masterXXX)))' 1.1"
Updated the `--help` information. With the new displayed text, the `--no-split` appears before the `<pwd_file>` to advise of the variable order. This is fixed with version 11.0.0-4A of the package univention-ssh. See commit 2d10e0c0.
univention-ssh.yaml 745455a17f9f | Bug #54588: update YAML for univention-ssh 2d10e0c0e41d | Bug #54588: Fix wrong ssh description. Add --no-split option before password file. univention-ssh (11.0.0-4) 2d10e0c0e41d | Bug #54588: Fix wrong ssh description. Add --no-split option before password file. Package: univention-ssh Version: 11.0.0-4A~5.0.0.202205111018 Branch: ucs_5.0-0 Scope: errata5.0-1 OK: univention-ssh.yaml OK: errata-announce -V --only univention-ssh.yaml OK: apt install univention-ssh -t apt OK: univention-ssh --help FAIL: univention-scp --help FAIL: univention-ssh-rsync --help The usage text for all 3 commands is confusing; compare it to `man -l doc/univention-ssh.8`: > univention-ssh: internal managing tool for UCS clients → Internal command to use SSH with plain text password authentication > Copyright (c) 2001-2022 Univention GmbH, Germany > > Syntax: > univention-ssh [-timeout timeout] [--no-split] <pwd_file> [options] [user@]host <command> → univention-ssh [-timeout <seconds>] [--no-split] <pwd_file> [ssh-options] [<user>@]<host> <command> [<arguments>...] > univention-ssh [--help] [--version] > > Parameters: Python argparse names this section "positional arguments". > pwd_file file containing the password > options optional options to univention-ssh → ssh-options additional options to ssh > user user to log in as on the remote system > host name or ip address of the remote system > command command to be executed on remote system argumemts additional arguments to remote command > Options: > -timeout: timeout for operation in seconds -timeout SECONDS: … > --no-split: don't word-split command > -h | --help | -?: print this usage message > --version: print version information > > Description: > univention-ssh is an internal managing tool which is used to univention-ssh is an internal command to use SSH with plain text password authentication, which is used to > execute commands on remote computer systems, > e.g. univention-ssh /tmp/pwd root@192.168.0.31 ls -la / Similar for `univention-scp --help` and `univention-ssh-rsync --help`: > univention-scp: internal managing tool for UCS clients similar to above > Syntax: > univention-scp [-timeout timeout] <pwd_file> [options] files [user@]host:[path] here `scp-options` or `rsync-options` are correct, which requires duplicating the template. > univention-scp [--help] [--version] > > Parameters: > pwd_file file containing the password > options optional options to univention-scp s.o. > files source files or directories > user user to log in as on the remote system > host name or ip address of the remote system > path destination on the remote system > > Options: > -timeout: timeout for operation in seconds > --no-split: don't word-split command Technical univention-scp/…-ssh-rsync accepts this option too, but the old "split" semantics is even stranger for them. Nevertheless we should also add [--no-split] to Syntax above. > -h | --help | -?: print this usage message > --version: print version information > > Description: > univention-scp is an internal managing tool which is used to univention-ssh is an internal command to use SCP/rsync with plain text password authentication, which is used to > copy files from/to remote computer systems, > e.g. univention-scp /tmp/pwd file.txt root@192.168.0.31: TODO: While you are at it please also fix the spelling mistake in doc/univention-ssh.8: rsyn{v → c} and convert ssh to \fBssh\fP in the Note: line. PS: You're free to replace the local function `trim` with `from textwrap import dedent` and then use dedent(text).strip("\n") instead.
The purposed changes were updated on the following commits: 4bf672b074 Bug #54588: add errata file 215532222e Bug #54588: fix consinsistency of help messages 0a41f67e58 Bug #54588: add --no-split to scp and rsync too b2bf75e9b2 Bug #54588: change trim function to dedent ad53046d3f Bug #54588: change trim function to dedent 65f230c117 Bug #54588: Fix spelling mistake rsynv to rsync, and bold to ssh on note section 745455a17f Bug #54588: update YAML for univention-ssh 2d10e0c0e4 Bug #54588: Fix wrong ssh description. Add --no-split option before password file.
Fixed on version 11.0.0-5A~5.0.0.202206071147 * Updated the description message for `univention-scp` and `univention-rsync` *Fix spelling mistake rsyn{v->c} * Change local trim function to imported `dedent` function
OK: univention-ssh.yaml OK: errata-announce -V --only univention-ssh.yaml OK: apt install univention-ssh -t apt OK: univention-ssh --help OK: univention-scp --help OK: univention-ssh-rsync --help OK: spelling mistake in doc/univention-ssh.8 OK: c128810bf9 Bug #54588: update YAML for univention-ssh f1660ce3c7 Bug #54588: Improve univention scp and rsync help description 745455a17f Bug #54588: update YAML for univention-ssh 2d10e0c0e4 Bug #54588: Fix wrong ssh description. Add --no-split option before password file.
<https://errata.software-univention.de/#/?erratum=5.0x329>