This has come up several times but there is not one issue that only hits this.
Add a line like this to your ssh config: RemoteCommand bash -l. Some people like to do this to set a default shell. But they will get an error message like Cannot execute command-line and remote command. because we can't pass the install script when a RemoteCommand is defined.
Fixing this to override RemoteCommand in all of our generated ssh commands.
RemoteCommand is not supported before SSH 7.6 which is not that old, so I should only set this if the user has it in their config.
Can I get some clarification here? I have ssh v7.6, and when I put a RemoteCommand in the .ssh/config file, I get the above error, Cannot execute command-line and remote command.. When I connect via ssh locally, it works no problem. It seems to me the generated ssh commands are not ignoring RemoteCommand, but it is still failing.
Can you share your ssh config? Seems we are not detecting your RemoteCommand
Host tbcs
User ubuntu
HostName remote.url
Port 3463
IdentityFile C:\Path\To\Key.pem
RequestTTY force
RemoteCommand ssh -p59990 root@localhost
It could be that the problem is that I'm ssh'ing a second time, but the config does work when I ssh via command line.
I can't reproduce this, can you share the log from the Remote - SSH output channel?
Sure!
[email protected]
win32 x64
SSH Resolver called for "ssh-remote+tbcs", attempt 1
SSH Resolver called for host: tbcs
Setting up SSH remote "tbcs"
Using commit id "0f3794b38477eea13fb47fbe15a42798e6129338" and quality "stable" for server
Testing ssh with ssh -V
ssh exited with code: 0
Got stderr from ssh: OpenSSH_for_Windows_7.6p1, LibreSSL 2.6.4
Install and start server if needed
>
> Cannot execute command-line and remote command.
> The process tried to write to a nonexistent pipe.
>
"install" terminal command done
Received install output: The process tried to write to a nonexistent pipe.
The process tried to write to a nonexistent pipe
------
I can repro it, just on windows, thanks