How to enable SSH access for an AlmaLinux 9 devcontainer? #175344
-
Select Topic AreaQuestion BodyHi! I'm new to GitHub Codespaces, and I've created my first dev container. I am trying to add SSH access to it, from my computer. I've installed with But the I suppose this can be done, as there are options in the documentation for this, I just don't know how to set it up -- can anyone help? Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
This comment was marked as off-topic.
This comment was marked as off-topic.
-
|
Hi @Aqib121201! Thank you so much for the answer! How can I validate that Because when I try to login, I get I tried with Another thing. What do you mean by "running ssh dev@localhost with port 2222 if you are attached locally"? Can I ssh connect to the host machine somehow? Because I am not aware of being able to ssh into anything else other than the container. Attached locally, how?! Before moving to GitHub CLI's Codespaces SSH support, I want to explore this further, as it sesms it has to work! Thank you! |
Beta Was this translation helpful? Give feedback.
-
|
Ok, I have managed to connect to my codespace with errors out: Any idea why? |
Beta Was this translation helpful? Give feedback.
@esthezia The next step is to stop trying to reach SSH over the app.github.dev URL. Those forwarded URLs only proxy HTTP. Raw SSH there will time out even if sshd is healthy. Keep sshd in your devcontainer and use the GitHub CLI tunnel for SSH and file copy. Your scp failure is because OpenSSH now defaults to SFTP and your container does not expose the SFTP subsystem. Add it and create the sshd runtime dir so privilege separation works.