Skip to content
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

Docker rootless SSH access error: "Permission denied (publickey)" due to OpenSSH 8.8 RSA SHA-1 deprecation #17910

Closed
raffitz opened this issue Dec 5, 2021 · 2 comments
Labels
issue/duplicate The issue has already been reported. issue/workaround it is or has a workaround

Comments

@raffitz
Copy link

raffitz commented Dec 5, 2021

Gitea Version

1.15.6 built with GNU Make 4.3, go1.16.9 : bindata, timetzdata, sqlite, sqlite_unlock_notify (docker gitea/gitea:1.15.6-rootless)

Git Version

No response

Operating System

No response

How are you running Gitea?

I am running gitea through the docker container gitea/gitea:1.15.6-rootless (image id b26ce93dd8b2)

Database

SQLite

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Description

Using an OpenSSH 8.8 client, using a Gitea server running the built-in ssh server, it leads to an error due to no mutual signature algorithms between ssh server and client.

debug1: Offering public key: *** RSA SHA256:***
debug1: send_pubkey_test: no mutual signature algorithm

OpenSSH 8.8 deprecated RSA signatures using SHA-1 hashes (release notes here).

The built-in ssh server was not prepared for this deprecation, as per upstream: golang/go#49952

Presumably, once the above upstream issue is fixed and Gitea updates the go ssh module version, the Gitea issue will be fixed as well.

Stopgap solution:

As per the OpenSSH 8.8 release notes, I configured my local OpenSSH 8.8 client (through the ssh_config file) with the following:

    Host gitea-host
        HostkeyAlgorithms +ssh-rsa
	PubkeyAcceptedAlgorithms +ssh-rsa

This was sufficient to stop the "Permission denied (publickey)" messages from appearing and for my fetches, pushes and pulls to start working again.

Screenshots

No response

@wxiaoguang
Copy link
Contributor

Related to this one:

@zeripath
Copy link
Contributor

zeripath commented Dec 5, 2021

This is a duplicate of #17798

@zeripath zeripath closed this as completed Dec 5, 2021
@zeripath zeripath added the issue/duplicate The issue has already been reported. label Dec 5, 2021
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
@wxiaoguang wxiaoguang changed the title Docker -> SSH access error: "Permission denied (publickey)" due to OpenSSH 8.8 RSA SHA-1 deprecation Docker rootless SSH access error: "Permission denied (publickey)" due to OpenSSH 8.8 RSA SHA-1 deprecation Apr 30, 2022
@wxiaoguang wxiaoguang added the issue/workaround it is or has a workaround label Apr 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/duplicate The issue has already been reported. issue/workaround it is or has a workaround
Projects
None yet
Development

No branches or pull requests

3 participants