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

Connection with SSH terminal in VSCode #61

Closed
wants to merge 3 commits into from

Conversation

nunure
Copy link

@nunure nunure commented Oct 16, 2018

This PR allows users to connect an SSH Terminal in VSCode using the same configuration file.

I saw this functionality in your TODO.md and I needed it, so here it is !

I create a new file "connectTerminal.ts" that use your functions to get the config.
My function simply print in a terminal the SSH command with different parameters depending on the configuration file (connection type, port).

@schrej
Copy link
Contributor

schrej commented Oct 17, 2018

resolves #26

@SchoofsKelvin
Copy link
Owner

While this approach works mostly when the ssh command is globally available (as in $PATH), it is not ideal right now. Windows, for example, usually doesn't have the ssh command.

I'm actually waiting for microsoft/vscode#58660 to be released, although I've considered (as explained in #26) using a custom program, but this leads to other problems on its own. Once (easily) creating a terminal is possible, all I would have to do is use createSSH (from connect.ts) and link it up to the terminal.

I'll leave this open for a bit, as I'm considering merging it for now, but I'm not sure how I'll deal with situations where the ssh command missing. PuTTY users on Windows might have plink available instead, but still...

@SchoofsKelvin SchoofsKelvin added enhancement New feature or request waiting Waiting for confirmation, more information, ... labels Oct 19, 2018
@felladrin
Copy link

I'd like to see this feature available too. I'm using SSHExtension, meanwhile.

@WSLUser
Copy link

WSLUser commented Feb 13, 2019

Check if WSL is enabled and a distro is installed, otherwise make Win-32-OpenSSH a dependency and use that to ensure ssh is available for Windows. If WSL is enabled, then I would use ssh from there before attempting to call ssh.exe. The newest Windows Insider makes it real easy to call ssh (or any other Linux binary) directly from PS/CMD but still easy enough to do in earlier versions. Win7/8.1 should automatically should have dependency on win32-openssh. Adding putty using plink should be used as a last resort.

@SchoofsKelvin
Copy link
Owner

SchoofsKelvin commented Feb 19, 2019

I'm actually waiting for microsoft/vscode#67923. When the extension creates an SFTP session, it'll first create an SSH session to start the SFTP session over. When vscode has their cross-platform TerminalRenderer released, linking those up should be easy and robust. No need for (shipped/assuming installed) binaries.

This pull request, along with #26, would then be solved.

@WSLUser
Copy link

WSLUser commented Jul 3, 2019

microsoft/vscode#76481 replaced microsoft/vscode#67923 and was finished yesterday. Though looking at the new issue that's referenced, there has been some polishing of it done today. But that shouldn't prevent progress on this PR anymore.

@foxfabi foxfabi mentioned this pull request Jun 17, 2020
@SchoofsKelvin
Copy link
Owner

Closed by dea6a03...e8ffe0e in v1.18.0

It's great to finally close this pull request, although not by merging.

I've made use of vscode's new PseudoTerminal API to allow creating terminals that directly make use of the existing connection algorithms. If your configuration works for file systems, it should work for terminals too. No extra hassle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request waiting Waiting for confirmation, more information, ...
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants