gitpod-io / gitpod-io/gitpod

Tailscale ssh to a gitpod container: "Unable to change owner or mode of tty stdin: Operation not permitted"

Open
#11,195 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature: tailscale meta: never-stale type: bug
Dominant language
TypeScript
Stars
13.8k
Forks
1.4k
Avg merge
17h 58m
Merged PRs (30d)
5

Description

Bug description

I cannot tailscale ssh into a gitpod container. I've tried several different client devices with the same result.

Authentication via tailscale ssh works, but then the tty cannot be allocated and the process fails with:

Unable to change owner or mode of tty stdin: Operation not permitted

I can tailscale ssh into other non-gitpod containers without issue.

Steps to reproduce

In a gitpod container:

  1. I've configured the TAILSCALE_AUTHKEY env var in gitpod with an ephemeral authkey
  2. Open the gitpod https://github.com/gitpod-io/template-tailscale
  3. Run tailscale up with your authkey and the ssh flag

On another device connected to the tailnet

  • ssh -v gitpod@<tailnet ip for the gitpod container>
Workspace affected

all

Expected behavior

I expect to be able to SSH to the gitpod instance via tailscale

Example repository

https://github.com/gitpod-io/template-tailscale

Anything else?

I first reported this issue over at tailscale, but based on the findings of this gitpod issue it seems that this phenomenon may be a consequence of gitpod's ssh daemon + container setup.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the gitpod-io/template-tailscale example repository and reproduce the Tailscale SSH connection in a Gitpod container. Review the linked Tailscale issue and Gitpod issue 3424 for findings about the SSH daemon and container setup. Done means a Tailscale SSH session can allocate its tty without the ownership or mode error.

Written by the indexing model from the issue text.

Assessment

Domain
infrastructure, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.