ssh kitten: Fix "Connection closed" message being printed by ssh when running remote commands

Don't force allocate a tty when running remote commands. This
matches ssh behavior as well.
This commit is contained in:
Kovid Goyal 2021-06-21 16:40:07 +05:30
parent fd4c7a4ed2
commit 1c25ed7666
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 6 additions and 1 deletions

View File

@ -18,6 +18,9 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
- ssh kitten: Support system where the login shell is a non-POSIX shell
- ssh kitten: Fix "Connection closed" message being printed by ssh when running
remote commands
- Add support for the XTVERSION escape code
- macOS: Fix a regression in 0.21.0 that broke middle-click to paste from clipboard (:iss:`3730`)

View File

@ -266,7 +266,9 @@ def main(args: List[str]) -> NoReturn:
cmd += server_args
else:
hostname, remote_args = server_args[0], server_args[1:]
cmd += ['-t', hostname]
if not remote_args:
cmd.append('-t')
cmd.append(hostname)
terminfo = subprocess.check_output(['infocmp', '-a']).decode('utf-8')
f = get_posix_cmd if use_posix else get_python_cmd
cmd += f(terminfo, remote_args)