Skip to content

Allow SSH agent forwarding #35617

@sesceu

Description

@sesceu

I'm using a gnubby key for SSH and SSH-ing into servers works fine using the ssh-agent.

However, gitea responds with permission denied (I did add the public key to gitea).

I checked the contents of ~/.ssh/authorized_keys inside gitea's docker container and it contains:

# gitea public key

command="/usr/local/bin/gitea --config=/data/gitea/conf/app.ini serv key-1",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty,no-user-rc,restrict <REDACTED PUBLIC KEY> publickey

I think this commad is hardcoded in:

tplPublicKey = tplCommentPrefix + "\n" + `command=%s,no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty,no-user-rc,restrict %s` + "\n"

So, it would be nice if there was an option to enable/disable these hardcoded flags (most importantly for me the no-agent-forwarding).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions