Having the following OS:
- Linux Ubuntu (18.04 LTS)
when I execute the ssh command I got the following:
> ssh
usage: ssh [some characters shown] [-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]According with Github documentation in the following section:
Has the following sentence:
$ ssh -T git@hostname
From above, observe the -T parameter, it does not appear in the first output.
It does not appear even in the 'official' documentation about SSH:
But it appears for example in Ubuntu documentation commands:
Here I am confused because in Ubuntu's documentation appears the -T parameter in the description section but not in the synopsis section. Question 1: Why this difference?
BTW in Ubuntu I executed apt update and apt upgrade
And well when I execute the $ ssh -T git@hostname command I don't receive an error about the -T parameter is invalid. Therefore it is valid but it does not appear in the first output.
Question 2: Why did not fail the command execution if theoretically -T is an invalid parameter?
Question 3: when is mandatory use -T?
Alpha
Using the dpkg -l openssh-client command shows:
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-=============================================-===========================-===========================-===============================================================================================
ii openssh-client 1:7.6p1-4ubuntu0.3 amd64 secure shell (SSH) client, for secure access to remote machinesFor the ssh -V command shows:
OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n 7 Dec 2017 2 1 Answer
The T option is in fact mentioned, in the portion of the synopsis that you redacted:
usage: ssh [-46AaCfGgKkMNnqsTtVvXxYy] [-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]] [user@]hostname [command]The usage is described in man ssh:
-T Disable pseudo-terminal allocation.essentially the opposite of -t:
-t Force pseudo-terminal allocation. This can be used to execute arbitrary screen-based programs on a remote machine, which can be very useful, e.g. when implementing menu services. Multiple -t options force tty allocation, even if ssh has no local tty.The synopsis shows it like [some characters shown] rather than like [-p port] because it's one of the (many) options that doesn't take an argument.