Skip to content

SSH into Codespaces or separate terminal window #3651

SSH into Codespaces or separate terminal window #3651
Mar 30, 2021 · 1 answers · 6 replies

Hi everyone!

I'm using Github Codespaces as my primary IDE for a week now. Everything is working great, but I would like to know if I can detach the IDE integrated terminal for a different monitor, or connect easily with my Codespace through SSH.

I would like to do so because I have 2 monitors, and it is a waste of space using a small integrated terminal since I could have it on a separate window.

Thanks in advance!

Replies

1 suggested answer
·
6 replies

HI @delucca,

We do have a way for you to SSH to a codespace detailed in these docs

Give it a shot and let us know how it goes?

And out of curiosity, are you primarily using your terminal with vim or just generally like the terminal to be larger than the integrated one in VS Code?

6 replies
@2percentsilk

Got it! Thanks for the quick and thorough explanation! That really helps out with your use case (and helps me think about how we can make this easier for you in the future!) 😄

@delucca

Got it! Thanks for the quick and thorough explanation! That really helps out with your use case (and helps me think about how we can make this easier for you in the future!) smile

Glad I could help :)

Regarding the link you shared. It works also in Github Codespaces directly on the browser? Or it only works while using a local VSCode installation?

I'm asking that because I faced some issues (that I've already reported on Github Tickets) with GraphQL servers while using Codespaces in the browser.

I'm away for my computer right now, so I was not able to test it yet.

@2percentsilk

It should work with Codespaces that you access via the browser as well as ones you connect to via the local VSCode installation.

I'll take a look for your GraphQL tickets - if you remember what you were trying to do when it failed, let me know/feel free to open a new Discussion for that!

@jkimbo

@2percentsilk I'm trying this workflow by accessing a codespace over ssh to run vim and tmux. However the container keeps stopping after some time , presumably because it's not seen any activity. Is there a way to prevent that?

@torbjornvatn

It should work with Codespaces that you access via the browser as well as ones you connect to via the local VSCode installation.

@2percentsilk I tried to get this to work, but I wasn't able to ssh -p2222 codespace@.... into the codespace with the torbjornvatn-unacast-pureflow-jr5qgc5qvw.github.dev as host. Is this described somewhere?

Answer selected by delucca
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Codespaces Feedback
Labels
None yet
4 participants