Skip to content

Allow SSH connection #1781

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

Closed
svenefftinge opened this issue Aug 31, 2020 · 29 comments
Closed

Allow SSH connection #1781

svenefftinge opened this issue Aug 31, 2020 · 29 comments
Labels
type: feature request New feature or request

Comments

@svenefftinge
Copy link
Member

We should natively and easily allow accessing workspaces through SSH.

@svenefftinge
Copy link
Member Author

This would support #1635 but also possibly other use cases based on SSH.

@jankeromnes
Copy link
Contributor

jankeromnes commented Aug 31, 2020

Agreed! 👍 This is an oft-requested feature.

Side note: It's already possible today to easily SSH into your Gitpod workspace (and to connect to other non-HTTP workspace services, like databases) by simply using Chisel. See instructions here.

@svenefftinge
Copy link
Member Author

Yes, I would remove the "easily" from that sentence, though.

@mai1015
Copy link

mai1015 commented Mar 6, 2021

I actually cannot connect it with chisel. and got something like this ssh_dispatch_run_fatal: Connection to UNKNOWN port 65535: message authentication code incorrect.

@lpil
Copy link

lpil commented Mar 7, 2021

Hello friends! I'm really enjoying GitPod, it's very exciting.

Being able to use a local VS Code front-end would be lovely as I'm having issues with my keyboard shortcuts being overriden by my browser's keyboard shortcuts. Is this official ssh connection a feature that we are likely to see in the near future?

Thank you

@davids-tips
Copy link

Is this being worked on?

@geropl
Copy link
Member

geropl commented Mar 19, 2021

We plan to investigate the "connect-from-local" space in the next cycle (April). Not a guarantee that we start with SSH first, but definitely one of the most important use-cases. Stay tuned!

@rthomps7
Copy link

@geropl

This functionality is the hold-up on our team using GitPod.

I see this on the docs:

Your local machine via local VS Code, IntelliJ or simply your shell/terminal where you SSH into your Gitpod workspace (expected to be released in early Q1/2021)

As well as you mentioned starting in April.

I understand timelines and priorities changed, but just looking for if this is still on the short-term horizon? If so we'll keep checking in for an update.

@jankeromnes
Copy link
Contributor

Hi @rthomps7! Thank you for asking.

The April development cycle shipped with an alpha version of a Gitpod Local Companion App that allows SSH access to your Gitpod workspaces. See the Pull Request for more details: #3958

This feature is currently under active development in the May cycle, and we expect to ship something that users can try in about two weeks from now.

@rthomps7
Copy link

Thanks @jankeromnes! Very helpful. Do you mind connecting any of that release info to this PR? We eagerly await :)

@jmcelreavey
Copy link

Hey guys, any more news on this? Would be awesome to run my workspaces locally when I'm at my workstation

@jankeromnes
Copy link
Contributor

Hey @rthomps7 and @jmcelreavey! I believe most of the Gitpod Local Companion App Beta code is now live in production (🎉) but there were a few last-minute blockers delaying the announcement blog post. Seems like it's all resolved and the blog post should go live pretty soon (next week?). It will have more information on how the Local App works and how it can be tested. Cc @rl-gitpod 😇

@akosyakov
Copy link
Member

Would be awesome to run my workspaces locally when I'm at my workstation

Just to clarify: workspace is remote, it is just your can access it on localhost or via SSH, not run workspace locally

@davidwindell
Copy link
Contributor

Couple of questions:

  • Can we remove Chisel from our custom workspace images now?
  • Is the chown /dev/pts fix going to apply to all workspaces now too?

Thanks!

@akosyakov
Copy link
Member

Last week we released the preview version of Gitpod Local Companion which supports ssh: https://www.gitpod.io/blog/local-app Please try and give us feedback.

Can we remove Chisel from our custom workspace images now?

With Gitpod Local Companion you don't need it.

Is the chown /dev/pts fix going to apply to all workspaces now too?

I don't think it is fixed, but Gitpod Local Companion should not rely on it.

@purkhusid
Copy link

Just to be clear, it is not yet supported to use the VS Code SSH plugin?

@akosyakov
Copy link
Member

akosyakov commented Jun 26, 2021

Just to be clear, it is not yet supported to use the VS Code SSH plugin?

  • Start local VS Code and install VS Code Remote SSH extension.
  • Point remote.SSH.configFile to /tmp/gitpod_ssh_config, it is a ssh config file aliasing connection information for each workspace
  • Add gitpod.gitpod-remote-ssh in remote.SSH.defaultExtensions setting, to install this extension in the server provisioned by VS Code into the gitpod workspace. It is in preview mode yet though and can break yet.
  • Go to SSH Connection View, select a workspace name and press connect to it

@extrawurst
Copy link

@akosyakov I am very excited about that feature.

It currently requires that you have a default SSH key setup in the ~/.ssh directory i.e. id_rsa.pub & id_rsa. The public key will be copied to the workspace to permit access. (link)

can I configure this somehow to use a different ssh key?

@akosyakov
Copy link
Member

can I configure this somehow to use a different ssh key?

Not yet, please file a new issue 🙏

@extrawurst
Copy link

@akosyakov done: #4759

@jmcelreavey
Copy link

Just to be clear, it is not yet supported to use the VS Code SSH plugin?

  • Start local VS Code and install VS Code Remote SSH extension.
  • Point remote.SSH.configFile to /tmp/gitpod_ssh_config, it is a ssh config file aliasing connection information for each workspace
  • Go to SSH Connection View, select a workspace name and press connect to it

That's said it is important to understand that VS Code Remote SSH will install own Code Server in the workspace which is not aware about any Gitpod integrations like heartbeating, tasks, ports and so on. We prototyped already a way to connect local VS Code directly to the same Gitpod Code Server which is used from the browser and it gives much better experience and more likely will be the recommended way eventually.

Sorry, could you explain a bit more about pointing the remote.SSH.config variable? Where does this variable live? :)

@jmcelreavey
Copy link

jmcelreavey commented Jul 9, 2021

Just to be clear, it is not yet supported to use the VS Code SSH plugin?

  • Start local VS Code and install VS Code Remote SSH extension.
  • Point remote.SSH.configFile to /tmp/gitpod_ssh_config, it is a ssh config file aliasing connection information for each workspace
  • Go to SSH Connection View, select a workspace name and press connect to it

That's said it is important to understand that VS Code Remote SSH will install own Code Server in the workspace which is not aware about any Gitpod integrations like heartbeating, tasks, ports and so on. We prototyped already a way to connect local VS Code directly to the same Gitpod Code Server which is used from the browser and it gives much better experience and more likely will be the recommended way eventually.

Sorry, could you explain a bit more about pointing the remote.SSH.config variable? Where does this variable live? :)

Apologies! Figured out you meant the Remote SSH extension config variable 🤦 I'm dumb. Thanks!

@jmcelreavey
Copy link

Doesn't seem to work on Windows, the Local Companion App tried to create the file tmp/gitpod_ssh_config but that directly doesn't exist on Windows. Perhaps it should be using %TEMP% for windows

@akosyakov
Copy link
Member

I'm going to close it, please open individual issues if something does not work with the local companion. We are going to work on better local VS Code integration and the cli for local companion next weeks.

@purkhusid
Copy link

@akosyakov Is there an issue that I can subscribe to regarding the VS Code integration?

@akosyakov
Copy link
Member

yes, sure, should have mentioned it in previous comment, sorry

@julkhami
Copy link

julkhami commented Oct 3, 2021

It seems like these remote SSH options (Chisel, Local Companion app) require installation of something on a local machine, so for example you can’t SSH in to your terminal with just an SSH app like Termius. Is there any way to do this or will there be in the future?

@tacomilkshake
Copy link

It seems like these remote SSH options (Chisel, Local Companion app) require installation of something on a local machine, so for example you can’t SSH in to your terminal with just an SSH app like Termius. Is there any way to do this or will there be in the future?

I agree. I'd prefer to use Blink to SSH into my workspace to run commands, than use the Terminal in VSCode.

@iQQBot
Copy link
Contributor

iQQBot commented Oct 5, 2021

@jamiesteven @julkhami see #5602 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request New feature or request
Projects
None yet
Development

No branches or pull requests