SSH hangs on fresh Gitea installation using built-in SSH server #5119

Closed
opened 2025-11-02 06:15:00 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @gpanders on GitHub (Mar 25, 2020).

  • Gitea version (or commit ref): Gitea version 1.9.6+1-g3c3823dc7 built with GNU Make 4.1, go1.12.13 : bindata, sqlite, sqlite_unlock_notify
  • Git version: 2.24.1
  • Operating system: Alpine
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist: See below

Description

I am trying to get Gitea set up in Docker on Raspbian. Gitea is up and I can access it, but I'm having difficulty with SSH.

I've added my public key to Gitea and when I SSH to the server it successfully connects and authenticates, but then hangs. I am using the SSH server included with Gitea.

Here is the gitea.log file in the Docker container:

2020/03/25 16:45:49 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `owner_id`, `name`, `fingerprint`, `content`, `mode`, `type`, `login_source_id`, `created_unix`, `updated_unix` FRO
M `public_key` WHERE (content like ?) LIMIT 1 []interface {}{"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC3sbJQ31tub7BWcGrmRhgpatxbw3vzX6RFaDLJUaHWKt2mij0CfenkOEANS7trpUUFnv9EOx+Wwr/uIdcFHgG+mUV2Bjqpge07
nI6JcjbeQIGPo8mR2+c94ciOZmieYOPhIXwodAQqlQLqYvDAGRJiGYrwNBFSBuoU5wFQcDSLaXXm/0sHmu/8EB6N5jD+My410N+J1pXBnNNDw1RM8VbxBUBY+h6IM2Q4kA+wr9tDor3K96AGUG9N/yk2YhIHigY3TQeczjpScw7nXKz+Mwd68jzt8KXoAA8vkVZmlN
i15Jbn61eBc1xe5PfyaxBRQCes88/wiWQM0Gh5BvOTi/Jh%"}

Here is the SSH verbose output (with -vvv):

OpenSSH_8.2p1, OpenSSL 1.1.1d  10 Sep 2019
debug1: Reading configuration data /Users/greande/.ssh/config
debug1: Reading configuration data /usr/local/etc/ssh/ssh_config
debug1: Connecting to 192.168.0.100 [192.168.0.100] port 2222.
debug1: Connection established.
debug1: identity file /Users/greande/.ssh/id_rsa type 0
debug1: identity file /Users/greande/.ssh/id_rsa-cert type -1
debug1: identity file /Users/greande/.ssh/id_dsa type -1
debug1: identity file /Users/greande/.ssh/id_dsa-cert type -1
debug1: identity file /Users/greande/.ssh/id_ecdsa type -1
debug1: identity file /Users/greande/.ssh/id_ecdsa-cert type -1
debug1: identity file /Users/greande/.ssh/id_ecdsa_sk type -1
debug1: identity file /Users/greande/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /Users/greande/.ssh/id_ed25519 type -1
debug1: identity file /Users/greande/.ssh/id_ed25519-cert type -1
debug1: identity file /Users/greande/.ssh/id_ed25519_sk type -1
debug1: identity file /Users/greande/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /Users/greande/.ssh/id_xmss type -1
debug1: identity file /Users/greande/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.2
debug1: Remote protocol version 2.0, remote software version Go
debug1: no match: Go
debug1: Authenticating to 192.168.0.100:2222 as 'git'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256@libssh.org
debug1: kex: host key algorithm: ssh-rsa
debug1: kex: server->client cipher: aes128-ctr MAC: hmac-sha2-256-etm@openssh.com compression: none
debug1: kex: client->server cipher: aes128-ctr MAC: hmac-sha2-256-etm@openssh.com compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ssh-rsa SHA256:E2D4D5jKLfkIt9JBYjBBIk/yTFAklZXYs/S38uU11Wo
debug1: Host '[192.168.0.100]:2222' is known and matches the RSA host key.
debug1: Found key in /Users/greande/.ssh/known_hosts:61
debug1: rekey out after 4294967296 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after 4294967296 blocks
debug1: Will attempt key: /Users/greande/.ssh/id_rsa RSA SHA256:AYVgDIYMBulJGj17uVJquVs5V5RrtZKAWErQM4FbcM0
debug1: Will attempt key: /Users/greande/.ssh/id_dsa
debug1: Will attempt key: /Users/greande/.ssh/id_ecdsa
debug1: Will attempt key: /Users/greande/.ssh/id_ecdsa_sk
debug1: Will attempt key: /Users/greande/.ssh/id_ed25519
debug1: Will attempt key: /Users/greande/.ssh/id_ed25519_sk
debug1: Will attempt key: /Users/greande/.ssh/id_xmss
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering public key: /Users/greande/.ssh/id_rsa RSA SHA256:AYVgDIYMBulJGj17uVJquVs5V5RrtZKAWErQM4FbcM0
debug1: Server accepts key: /Users/greande/.ssh/id_rsa RSA SHA256:AYVgDIYMBulJGj17uVJquVs5V5RrtZKAWErQM4FbcM0
debug1: Authentication succeeded (publickey).
Authenticated to 192.168.0.100 ([192.168.0.100]:2222).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: pledge: network
Originally created by @gpanders on GitHub (Mar 25, 2020). <!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): **Gitea version 1.9.6+1-g3c3823dc7 built with GNU Make 4.1, go1.12.13 : bindata, sqlite, sqlite_unlock_notify** - Git version: **2.24.1** - Operating system: **Alpine** - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [X] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [X] Not relevant - Log gist: See below ## Description I am trying to get Gitea set up in Docker on Raspbian. Gitea is up and I can access it, but I'm having difficulty with SSH. I've added my public key to Gitea and when I SSH to the server it successfully connects and authenticates, but then hangs. I am using the SSH server included with Gitea. Here is the `gitea.log` file in the Docker container: ``` 2020/03/25 16:45:49 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `owner_id`, `name`, `fingerprint`, `content`, `mode`, `type`, `login_source_id`, `created_unix`, `updated_unix` FRO M `public_key` WHERE (content like ?) LIMIT 1 []interface {}{"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC3sbJQ31tub7BWcGrmRhgpatxbw3vzX6RFaDLJUaHWKt2mij0CfenkOEANS7trpUUFnv9EOx+Wwr/uIdcFHgG+mUV2Bjqpge07 nI6JcjbeQIGPo8mR2+c94ciOZmieYOPhIXwodAQqlQLqYvDAGRJiGYrwNBFSBuoU5wFQcDSLaXXm/0sHmu/8EB6N5jD+My410N+J1pXBnNNDw1RM8VbxBUBY+h6IM2Q4kA+wr9tDor3K96AGUG9N/yk2YhIHigY3TQeczjpScw7nXKz+Mwd68jzt8KXoAA8vkVZmlN i15Jbn61eBc1xe5PfyaxBRQCes88/wiWQM0Gh5BvOTi/Jh%"} ``` Here is the SSH verbose output (with `-vvv`): ``` OpenSSH_8.2p1, OpenSSL 1.1.1d 10 Sep 2019 debug1: Reading configuration data /Users/greande/.ssh/config debug1: Reading configuration data /usr/local/etc/ssh/ssh_config debug1: Connecting to 192.168.0.100 [192.168.0.100] port 2222. debug1: Connection established. debug1: identity file /Users/greande/.ssh/id_rsa type 0 debug1: identity file /Users/greande/.ssh/id_rsa-cert type -1 debug1: identity file /Users/greande/.ssh/id_dsa type -1 debug1: identity file /Users/greande/.ssh/id_dsa-cert type -1 debug1: identity file /Users/greande/.ssh/id_ecdsa type -1 debug1: identity file /Users/greande/.ssh/id_ecdsa-cert type -1 debug1: identity file /Users/greande/.ssh/id_ecdsa_sk type -1 debug1: identity file /Users/greande/.ssh/id_ecdsa_sk-cert type -1 debug1: identity file /Users/greande/.ssh/id_ed25519 type -1 debug1: identity file /Users/greande/.ssh/id_ed25519-cert type -1 debug1: identity file /Users/greande/.ssh/id_ed25519_sk type -1 debug1: identity file /Users/greande/.ssh/id_ed25519_sk-cert type -1 debug1: identity file /Users/greande/.ssh/id_xmss type -1 debug1: identity file /Users/greande/.ssh/id_xmss-cert type -1 debug1: Local version string SSH-2.0-OpenSSH_8.2 debug1: Remote protocol version 2.0, remote software version Go debug1: no match: Go debug1: Authenticating to 192.168.0.100:2222 as 'git' debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: algorithm: curve25519-sha256@libssh.org debug1: kex: host key algorithm: ssh-rsa debug1: kex: server->client cipher: aes128-ctr MAC: hmac-sha2-256-etm@openssh.com compression: none debug1: kex: client->server cipher: aes128-ctr MAC: hmac-sha2-256-etm@openssh.com compression: none debug1: expecting SSH2_MSG_KEX_ECDH_REPLY debug1: Server host key: ssh-rsa SHA256:E2D4D5jKLfkIt9JBYjBBIk/yTFAklZXYs/S38uU11Wo debug1: Host '[192.168.0.100]:2222' is known and matches the RSA host key. debug1: Found key in /Users/greande/.ssh/known_hosts:61 debug1: rekey out after 4294967296 blocks debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: rekey in after 4294967296 blocks debug1: Will attempt key: /Users/greande/.ssh/id_rsa RSA SHA256:AYVgDIYMBulJGj17uVJquVs5V5RrtZKAWErQM4FbcM0 debug1: Will attempt key: /Users/greande/.ssh/id_dsa debug1: Will attempt key: /Users/greande/.ssh/id_ecdsa debug1: Will attempt key: /Users/greande/.ssh/id_ecdsa_sk debug1: Will attempt key: /Users/greande/.ssh/id_ed25519 debug1: Will attempt key: /Users/greande/.ssh/id_ed25519_sk debug1: Will attempt key: /Users/greande/.ssh/id_xmss debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey debug1: Next authentication method: publickey debug1: Offering public key: /Users/greande/.ssh/id_rsa RSA SHA256:AYVgDIYMBulJGj17uVJquVs5V5RrtZKAWErQM4FbcM0 debug1: Server accepts key: /Users/greande/.ssh/id_rsa RSA SHA256:AYVgDIYMBulJGj17uVJquVs5V5RrtZKAWErQM4FbcM0 debug1: Authentication succeeded (publickey). Authenticated to 192.168.0.100 ([192.168.0.100]:2222). debug1: channel 0: new [client-session] debug1: Entering interactive session. debug1: pledge: network ```
Author
Owner

@zeripath commented on GitHub (Mar 25, 2020):

Looks like you've hit a deadlock in sqlite which seems odd. However why are you using 1.9.6? We can't support such an old a version.

Please upgrade to at least 1.11.3 or master.

@zeripath commented on GitHub (Mar 25, 2020): Looks like you've hit a deadlock in sqlite which seems odd. However why are you using 1.9.6? We can't support such an old a version. Please upgrade to at least 1.11.3 or master.
Author
Owner

@gpanders commented on GitHub (Mar 25, 2020):

However why are you using 1.9.6? We can't support such an old a version.

Wow, honest mistake: when I downloaded the version from the Gitea website I simply scrolled to the bottom of the downloads page naively assuming that's where the newest version would be.

Upgrading to 1.11.3 solves the problem. Apologies for the oversight.

@gpanders commented on GitHub (Mar 25, 2020): > However why are you using 1.9.6? We can't support such an old a version. Wow, honest mistake: when I downloaded the version from the Gitea website I simply scrolled to the bottom of the downloads page naively assuming that's where the newest version would be. Upgrading to 1.11.3 solves the problem. Apologies for the oversight.
Author
Owner

@lunny commented on GitHub (Mar 26, 2020):

So s3browser need a new sort based on sementic version. @techknowlogick

@lunny commented on GitHub (Mar 26, 2020): So s3browser need a new sort based on sementic version. @techknowlogick
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#5119