# Setting up SSH Issues

**URL:** <https://forum.gitea.com/t/setting-up-ssh-issues/11917>\
**Category:** Install/Maintain/Configure\
**Created:** [January 15, 2026, 8:03pm UTC](https://forum.gitea.com/t/setting-up-ssh-issues/11917 "2026-01-15T20:03:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![JordanP](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/jordanp/32/7206_2.png) [@JordanP](https://forum.gitea.com/u/JordanP)\
**Post date:** [January 15, 2026, 8:03pm UTC](https://forum.gitea.com/t/setting-up-ssh-issues/11917/1 "2026-01-15T20:03:17Z")

</div>

I’ve installed Gitea and now I’m trying to setup SSH, I’ve been told setting it up via SSH Shimming is not a good start so I’ve undone that and looked into how to do it now.

I’m running it on machine B with docker compose and then on machine A it’s an NGINX Proxy.  
I’ve got some issues with the initial setup though as it seems the SSH service just isn’t working?

What I’ve got setup:

```auto
networks:
gitea:
external: false

volumes:
gitea:
driver: local

services:
server:
image: docker.gitea.com/gitea:latest
container_name: gitea
environment:
- USER_UID=1000
- USER_GID=1000
- GITEA __database__ DB_TYPE=mysql
- GITEA __database__ HOST=db:3306
- GITEA __database__ NAME=gitea
- GITEA __database__ USER=jordan
- GITEA __database__ PASSWD=password
- GITEA __security__ SECRET_KEY=secret
- GITEA __security__ INTERNAL_TOKEN=token
- ENABLE_NOTIFY_MAIL=true
- ACTIVE_CODE_LIVE_MINUTES=60
- RESET_PASSWD_CODE_LIVE_MINUTES=60
- REGISTER_EMAIL_CONFIRM=true
- REGISTER_MANUAL_CONFIRM=true
- GITEA __server__ SSH_PORT=9102
- GITEA __server__ SSH_LISTEN_PORT=9102
restart: always
networks:
- gitea
volumes:
- ./gitea:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- “9101:3000”
- “9102:9102”
depends_on:
- db

db:
image: 

restart: always
environment:
- MYSQL_ROOT_PASSWORD=rootpassword
- MYSQL_USER=jordan
- MYSQL_PASSWORD=password
- MYSQL_DATABASE=gitea
networks:
- gitea
volumes:
- ./mysql:/var/lib/mysql

```

On the same machine:  
`ssh -T git@localhost -p 9102`  
`kex_exchange_identification: read: Connection reset by peer`  
`Connection reset by 127.0.0.1 port 9102`

I’m not really sure what’s happening here, on the web admin interface it’s saying that SSH is enabled but in my logs I don’t really see anything about it?  
Docker Gitea Logs:

```auto
Server listening on :: port 22.
Server listening on 0.0.0.0 port 22.
2026/01/15 19:31:13 cmd/web.go:266:runWeb() [I] Starting Gitea on PID: 16
2026/01/15 19:31:13 cmd/web.go:114:showWebStartupMessage() [I] Gitea version: 1.25.3 built with GNU Make 4.4.1, go1.25.5 : bindata, timetzdata, sqlite, sqlite_unlock_notify
2026/01/15 19:31:13 cmd/web.go:115:showWebStartupMessage() [I] * RunMode: prod
2026/01/15 19:31:13 cmd/web.go:116:showWebStartupMessage() [I] * AppPath: /usr/local/bin/gitea
2026/01/15 19:31:13 cmd/web.go:117:showWebStartupMessage() [I] * WorkPath: /data/gitea
2026/01/15 19:31:13 cmd/web.go:118:showWebStartupMessage() [I] * CustomPath: /data/gitea
2026/01/15 19:31:13 cmd/web.go:119:showWebStartupMessage() [I] * ConfigFile: /data/gitea/conf/app.ini
2026/01/15 19:31:13 cmd/web.go:120:showWebStartupMessage() [I] Prepare to run web server
2026/01/15 19:31:13 routers/init.go:118:InitWebInstalled() [I] Git version: 2.49.1 (home: /data/gitea/home)
2026/01/15 19:31:13 modules/storage/storage.go:180:initAttachments() [I] Initialising Attachment storage with type: local
2026/01/15 19:31:13 modules/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /data/gitea/attachments
2026/01/15 19:31:13 modules/storage/storage.go:170:initAvatars() [I] Initialising Avatar storage with type: local
2026/01/15 19:31:13 modules/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /data/gitea/avatars
2026/01/15 19:31:13 modules/storage/storage.go:196:initRepoAvatars() [I] Initialising Repository Avatar storage with type: local
2026/01/15 19:31:13 modules/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /data/gitea/repo-avatars
2026/01/15 19:31:13 modules/storage/storage.go:190:initLFS() [I] Initialising LFS storage with type: local
2026/01/15 19:31:13 modules/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /data/git/lfs
2026/01/15 19:31:13 modules/storage/storage.go:202:initRepoArchives() [I] Initialising Repository Archive storage with type: local
2026/01/15 19:31:13 modules/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /data/gitea/repo-archive
2026/01/15 19:31:13 modules/storage/storage.go:212:initPackages() [I] Initialising Packages storage with type: local
2026/01/15 19:31:13 modules/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /data/gitea/packages
2026/01/15 19:31:13 modules/storage/storage.go:223:initActions() [I] Initialising Actions storage with type: local
2026/01/15 19:31:13 modules/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /data/gitea/actions_log
2026/01/15 19:31:13 modules/storage/storage.go:227:initActions() [I] Initialising ActionsArtifacts storage with type: local
2026/01/15 19:31:13 modules/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /data/gitea/actions_artifacts
2026/01/15 19:31:13 routers/init.go:140:InitWebInstalled() [I] SQLite3 support is enabled
2026/01/15 19:31:13 routers/common/db.go:24:InitDBEngine() [I] Beginning ORM engine initialization.
2026/01/15 19:31:13 routers/common/db.go:31:InitDBEngine() [I] ORM engine initialization attempt #1/10…
2026/01/15 19:31:13 cmd/web.go:207:serveInstalled() [I] PING DATABASE mysql
2026/01/15 19:31:13 routers/common/db.go:37:InitDBEngine() [E] ORM engine initialization attempt #1/10 failed. Error: dial tcp 172.18.0.2:3306: connect: connection refused
2026/01/15 19:31:13 routers/common/db.go:38:InitDBEngine() [I] Backing off for 3 seconds
2026/01/15 19:31:16 routers/common/db.go:31:InitDBEngine() [I] ORM engine initialization attempt #2/10…
2026/01/15 19:31:16 cmd/web.go:207:serveInstalled() [I] PING DATABASE mysql
2026/01/15 19:31:16 cmd/web.go:207:serveInstalled() [W] Table system_setting Column version db default is , struct default is 1
2026/01/15 19:31:17 cmd/web.go:207:serveInstalled() [W] Table label Column archived_unix db default is , struct default is NULL
2026/01/15 19:31:17 routers/init.go:146:InitWebInstalled() [I] ORM engine initialization successful!
2026/01/15 19:31:17 …/indexer/issues/indexer.go:78:InitIssueIndexer.1() [I] PID 16: Initializing Issue Indexer: bleve
2026/01/15 19:31:17 …/indexer/stats/indexer.go:41:populateRepoIndexer() [I] Populating the repo stats indexer with existing repositories
2026/01/15 19:31:17 …/indexer/issues/indexer.go:155:InitIssueIndexer.2() [I] Issue Indexer Initialization took 3.72849ms
2026/01/15 19:31:17 cmd/web.go:328:listen() [I] Listen: ``http://0.0.0.0:3000
2026/01/15 19:31:17 cmd/web.go:332:listen() [I] AppURL(ROOT_URL): ``https://git.mydomain.xyz/
2026/01/15 19:31:17 cmd/web.go:335:listen() [I] LFS server enabled
2026/01/15 19:31:17 modules/graceful/server.go:50:NewServer() [I] Starting new Web server: tcp:0.0.0.0:3000 on PID: 16
2026/01/15 19:34:32 HTTPRequest [I] router: completed GET /-/admin/config for 162.158.74.32:0, 200 OK in 53.9ms @ admin/config.go:120(admin.Config)
2026/01/15 19:34:35 HTTPRequest [I] router: polling GET /user/events for 162.158.74.32:0, elapsed 3279.0ms @ events/events.go:18(events.Events)
2026/01/15 19:34:39 HTTPRequest [I] router: completed GET /Jordan for 162.158.74.33:0, 200 OK in 97.0ms @ user/home.go:715(user.UsernameSubRoute)
2026/01/15 19:34:39 HTTPRequest [I] router: completed GET /avatars/a448371e6340d4423dc17136a68c7b5cbf7e1aaf893741302008759929332dd3?size=512 for 162.158.74.33:0, 200 OK in 1.3ms @ web/base.go:22(avatars)
2026/01/15 19:34:42 HTTPRequest [I] router: polling GET /user/events for 162.158.74.33:0, elapsed 3013.2ms @ events/events.go:18(events.Events)
2026/01/15 19:34:49 HTTPRequest [I] router: completed GET /Jordan for 162.158.74.32:0, 200 OK in 50.4ms @ user/home.go:715(user.UsernameSubRoute)
2026/01/15 19:34:53 HTTPRequest [I] router: polling GET /user/events for 162.158.74.32:0, elapsed 3789.3ms @ events/events.go:18(events.Events)
2026/01/15 20:00:46 HTTPRequest [I] router: completed GET / for 162.158.74.33:0, 200 OK in 50.6ms @ web/home.go:32(web.Home)
2026/01/15 20:00:47 HTTPRequest [I] router: completed GET /repo/search?count_only=1&uid=1&team_id=undefined&q=&page=1&mode= for 162.158.74.33:0, 200 OK in 8.9ms @ repo/repo.go:424(repo.SearchRepo)
2026/01/15 20:00:47 HTTPRequest [I] router: completed GET /repo/search?sort=updated&order=desc&uid=1&team_id=undefined&q=&page=1&limit=15&mode=&archived=false for 162.158.74.33:0, 200 OK in 11.9ms @ repo/repo.go:424(repo.SearchRepo)
2026/01/15 20:00:51 HTTPRequest [I] router: polling GET /user/events for 162.158.74.33:0, elapsed 3975.6ms @ events/events.go:18(events.Events)

```

Docker ps output:  
`docker.gitea.com/gitea:latest`` “/usr/bin/entrypoint…” 33 minutes ago Up 33 minutes 22/tcp, 0.0.0.0:9102->9102/tcp, [::]:9102->9102/tcp, 0.0.0.0:9101->3000/tcp, [::]:9101->3000/tcp gitea`

Not sure what is going on or what I should be doing as I’m told the SSH part of the documentation is being redone but not sure how I’d set it up now?
