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

SSH handler #6656

Closed
trajano opened this issue Jun 24, 2020 · 5 comments
Closed

SSH handler #6656

trajano opened this issue Jun 24, 2020 · 5 comments
Labels
Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.

Comments

@trajano
Copy link

trajano commented Jun 24, 2020

Description of the new feature/enhancement

I'd like to do something like

WinR wt [email protected] Enter

and it will start up or open an new tab in an existing Windows Terminal that will perform an SSH connection.

Proposed technical implementation details (optional)

Note this request is NOT to embed SSH itself to Windows Terminal, but provide some sort of generic handler for command lines with a username@host pattern along with ://@:/ pattern the protocol and ports should be defaultable (in my case if I had the configuration I would default to ssh since I generally work with that.

I was thinking it will be a profile that if not hidden will ask for a URL if selected and the "command" allows for extra fields that would be used to pass in the components

{
    "defaultUriProtocol": "ssh",

    "defaultUriProtocolHandlers":
    {
       "ssh": "{00000000-0000-0000-ba54-000000000001}"
    },

    "profiles":
    [

        {
            "guid": "{00000000-0000-0000-ba54-000000000001}",
            "commandline" : "%UserProfile%/scoop/apps/git/current/usr/bin/ssh.exe -p ${uri.port} ${uri.user}@${uri.host}",
            "startingDirectory": "%UserProfile%",
            "background": "#000000",            
            "fontFace": "Source Code Pro",
            "icon" : "c:\\opt\\icons8-console-96.png",
            "backgroundImage": "C:\\Users\\trajano\\OneDrive\\app-background\\terminal.png",
            "backgroundImageOpacity": 0.1,
            "name" : "SSH",
            "handlesUriProtocol" : "ssh"
        },

Note I used uri. to prefix it so we don't pollute the default namespace.

@trajano trajano added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label Jun 24, 2020
@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Jun 24, 2020
@zadjii-msft
Copy link
Member

zadjii-msft commented Jun 24, 2020

I mean it seems a lot easier to just do win+rwt ssh [email protected]enter then hook all that up, right? That'll just run your default profile with the commandline of ssh [email protected], instead of whatever the commandline is set to

@zadjii-msft zadjii-msft added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Jun 24, 2020
@trajano
Copy link
Author

trajano commented Jun 24, 2020

@zadjii-msft except it seems less seamless

If Terminal had this capability then it can probably register itself as a protocol handler for Windows as well so if we click on a link that looks like ssh://[email protected] it will start up terminal

@ghost ghost added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Jun 24, 2020
@vbyrd
Copy link

vbyrd commented Jun 24, 2020

I created a small launcher script and protocol registry entries to do exactly this.

https://github.com/vbyrd/windows-terminal-ssh-protocol-handler

@DHowett
Copy link
Member

DHowett commented Jun 25, 2020

Thanks @vbyrd! Yeah -- in general, I think this is something the community is better-equipped to handle than us. Registering a protocol handler, especially by default like that, is something that I'd like the user to explicitly opt into.

At the same time, I'm not liable to put too many ssh-specific features into Terminal itself. If anything, it would be part of the extension that /dup #1280 turns into.

@ghost
Copy link

ghost commented Jun 25, 2020

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost ghost closed this as completed Jun 25, 2020
@ghost ghost added Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements Needs-Attention The core contributors need to come back around and look at this ASAP. labels Jun 25, 2020
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.
Projects
None yet
Development

No branches or pull requests

4 participants