Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Configurable -T Parameter for Remote-SSH #7558

Closed
eleanorjboyd opened this issue Nov 21, 2022 · 20 comments
Closed

Add Configurable -T Parameter for Remote-SSH #7558

eleanorjboyd opened this issue Nov 21, 2022 · 20 comments
Assignees
Labels
feature-request Request for new features or functionality on-release-notes Issue/pull request mentioned in release notes ssh Issue in vscode-remote SSH verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@eleanorjboyd
Copy link
Member

Add an additional setting so the user can specify if they want to include the -T command in the connection string that is run by the extension. This parameter is necessary for many people but does cause issues for others so configurability is the best solution.

@eleanorjboyd
Copy link
Member Author

recommendation by @schiffy91 in #7673

Given this seems to be experienced by multiple users, I think a robust solution would be for the client to try with 'T'; if it fails, try again without 'T'. I don't think there needs to be a setting to enable/disable as much as this setting seems to have pretty weird implementations on different distributions of SSH.

@eleanorjboyd
Copy link
Member Author

issue reported here: #8063

@davidpasqua-asml
Copy link

Thank you, but I guess any advanced user will prefer to have the option to configure any ssh parameter (could be more needed depending on a number of factors)
losing extra time trying extra parameters doesn't do any good for the overall usage of any application

@eleanorjboyd
Copy link
Member Author

@davidpasqua-asml, some of the ssh parameters interfere with our install script, are there any ssh parameters, in particular, you want configurable?

@sluc23
Copy link

sluc23 commented Apr 12, 2023

any update on this issue? I'm facing same problem, unable to connect to Debian host with -T parameter

@eleanorjboyd
Copy link
Member Author

No sorry, the issue will be tagged by our iteration plan issue when it does go into our monthly plan so once you see that then you know it is being worked on. Thanks!

@sluc23
Copy link

sluc23 commented Apr 12, 2023

ok, thanks.. is there any workaround or patch I could apply manually meanwhile?

@eleanorjboyd
Copy link
Member Author

@roblourens, can answer this question? Thanks!

@tanminhan0
Copy link

I got this issue and couldn't connect remote ssh to my raspberrypi.local and I could connect from puTTy, somehow when I tried to use the extension to remote connect ssh to the raspberrypi it couldn't establish a connection and I tried it again it spammed out Waiting for server logs... and still failed connection. I tried the way I connect the remote from the terminal using ssh -v -T -D 56207 -o ConnectTimeout=30 raspberrypi.local without -T parameter is connecting in the terminal but I would like to connect with the extension so that I could show the code and edit the code in the VSCode, do you have any idea how could I fix it @eleanorjboyd

@eleanorjboyd
Copy link
Member Author

@tanminhan0 can you please create a new bug report? Then we can answer it from there, thanks

@KegangWangCCNU
Copy link

I encountered the same problem, which is due to vscode creating a configuration file when first connecting to a remote computer, and the operating system in the configuration file may be incorrect. For example, when I connected to a Windows host, it created a Linux configuration file. By correcting the operating system in remote.SSH.remotePlatform, all problems were solved.

@on1ytampax
Copy link

@eleanorjboyd @roblourens Hello, I'm also having this issue when i can't connect to remote server via ssh with -T parameter. I tried to use "RequestTTY force" option in ssh config, but this option doesn't override -T parameter. Right now i have no workaround, so this issue is very critical for me. Please, help :)

@DuMoH112
Copy link

I also have this problem when connecting to vs code server on mac os. We will wait for the start of work on the task)

@thundercarrot
Copy link

I'm seeing the same problem going from Windows to Windows. I was able to work around it by specifying a RemoteCommand for the connection that starts a shell. I guess that defeats -T?

    "remote.SSH.useLocalServer": true,
    "remote.SSH.enableRemoteCommand": true,

and then in the .ssh config file:

Host xxxx
  HostName xxxx
  Port xxx
  User xxx
  RemoteCommand cmd.exe

@asmith22
Copy link

asmith22 commented Jan 9, 2024

@davidpasqua-asml, some of the ssh parameters interfere with our install script, are there any ssh parameters, in particular, you want configurable?

I think is relevant to an unrelated issue I have with X11 forwarding through the VSCode RemoteSSH integrated terminal, we need -X and have tried
ForwardX11 yes
ForwardX11Trusted yes
ForwardAgent yes

In the .ssh config file but still get "-v -T -D 57353 -o ConnectTimeout=15 " as the ssh command in the output window.

I couldn't find an open issue about this but feel free to send me there if anyone is aware of one.

@zaunere
Copy link

zaunere commented Jan 15, 2024

FWIW, I saw this issue related to an older server and newer VSCode. It seems to related to the resolution of avoiding to enter your password multiple times.

On an old server, Insider persisted with the opening log error, regardless of deleting existing .vscode* directories.
Without Insider, it works but requires the password multiple times (old behavior).

OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017
Linux123.com 4.14.214-160.339.amzn2.x86_64 #1 SMP Sun Jan 10 05:53:05 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

@mcwindy
Copy link

mcwindy commented Jan 18, 2024

I'm seeing the same problem going from Windows to Windows. I was able to work around it by specifying a RemoteCommand for the connection that starts a shell. I guess that defeats -T?

    "remote.SSH.useLocalServer": true,
    "remote.SSH.enableRemoteCommand": true,

and then in the .ssh config file:

Host xxxx
  HostName xxxx
  Port xxx
  User xxx
  RemoteCommand cmd.exe

This worked for me, except for that i need to enter my password twice.

@MianWang123
Copy link

I also have this problem when connecting to vs code server on mac os. We will wait for the start of work on the task)

+1

@maxencefaldor
Copy link

Any update on this @eleanorjboyd?

I encounter the same issue. The command being run by VSCode is ssh -v -T -D 58077 -o ConnectTimeout=15 remote

For me, it is crucial to be able to connect to remote and then execute a command with:

Host remote
        HostName ...
        User ...
        RemoteCommand <command that starts an interactive shell>
        RequestTTY yes

However, the option -T prevents the interactive shell to start and the connection fails.
When I run manually ssh -v -D 58077 -o ConnectTimeout=15 remote without -T, it works fine.

  • Does someone know of any workaround?
  • Do you plan to give configurability for the -T option?

Thanks!

@roblourens roblourens changed the title Add Configurability -T Parameter Remote-SSH Add Configurable -T Parameter for Remote-SSH Jul 16, 2024
@joshspicer joshspicer self-assigned this Jul 18, 2024
@joshspicer joshspicer modified the milestones: Backlog, July 2024 Jul 18, 2024
@joshspicer
Copy link
Member

👋 Pre-release version v0.113.2024071915 ships with a new option Remote.SSH: Permit Pty Allocation that omits the -T flag. Please let me know here if this helps or if there's any other relevant feedback!

Image

@joshspicer joshspicer added the verification-needed Verification of issue is requested label Jul 23, 2024
@rzhao271 rzhao271 added the verified Verification succeeded label Jul 23, 2024
@joshspicer joshspicer added the on-release-notes Issue/pull request mentioned in release notes label Jul 26, 2024
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Sep 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality on-release-notes Issue/pull request mentioned in release notes ssh Issue in vscode-remote SSH verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests