Codeberg/Community
54
325
Fork
You've already forked Community
12

Unable to access repositories with SSH from certain networks #2179

Closed
opened 2025年10月19日 17:16:58 +02:00 by greenukworks · 2 comments

Comment

Hi,

I am trying to access a repository via SSH from within a Pod (for Flux), but although it works fine on my local machine I am unable to connect from other places. The connection just hangs and times out, so never gets as far as attempting authentication.

debug1: OpenSSH_10.0p2, OpenSSL 3.5.0 8 Apr 2025
debug3: Running on Linux 6.17.2-1-default #1 SMP PREEMPT_DYNAMIC Sun Oct 12 17:26:11 UTC 2025 (d07fa64) x86_64
debug3: Started with: ssh -vvvvvv -o SendEnv=GIT_PROTOCOL git@codeberg.org "git-upload-pack \\'/the-organisation/deployments.git\\'"
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 22: include /etc/ssh/ssh_config.d/*.conf matched no files
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/root/.ssh/known_hosts'
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/root/.ssh/known_hosts2'
debug2: resolving "codeberg.org" port 22
debug3: resolve_host: lookup codeberg.org:22
debug3: channel_clear_timeouts: clearing
debug3: ssh_connect_direct: entering
debug1: Connecting to codeberg.org [217.197.84.140] port 22.
debug3: set_sock_tos: set socket 3 IP_TOS 0x48
debug1: connect to address 217.197.84.140 port 22: Operation timed out
debug1: Connecting to codeberg.org [2a0a:4580:103f:c0de::1] port 22.
debug3: set_sock_tos: set socket 3 IPV6_TCLASS 0x48
debug1: connect to address 2a0a:4580:103f:c0de::1 port 22: Network unreachable
ssh: connect to host codeberg.org port 22: Network unreachable
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

DNS seems to be working, and I can curl the codeberg homepage from within the Pod.

Is there anything else I should be checking?

### Comment Hi, I am trying to access a repository via SSH from within a Pod (for Flux), but although it works fine on my local machine I am unable to connect from other places. The connection just hangs and times out, so never gets as far as attempting authentication. ``` debug1: OpenSSH_10.0p2, OpenSSL 3.5.0 8 Apr 2025 debug3: Running on Linux 6.17.2-1-default #1 SMP PREEMPT_DYNAMIC Sun Oct 12 17:26:11 UTC 2025 (d07fa64) x86_64 debug3: Started with: ssh -vvvvvv -o SendEnv=GIT_PROTOCOL git@codeberg.org "git-upload-pack \\'/the-organisation/deployments.git\\'" debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 22: include /etc/ssh/ssh_config.d/*.conf matched no files debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/root/.ssh/known_hosts' debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/root/.ssh/known_hosts2' debug2: resolving "codeberg.org" port 22 debug3: resolve_host: lookup codeberg.org:22 debug3: channel_clear_timeouts: clearing debug3: ssh_connect_direct: entering debug1: Connecting to codeberg.org [217.197.84.140] port 22. debug3: set_sock_tos: set socket 3 IP_TOS 0x48 debug1: connect to address 217.197.84.140 port 22: Operation timed out debug1: Connecting to codeberg.org [2a0a:4580:103f:c0de::1] port 22. debug3: set_sock_tos: set socket 3 IPV6_TCLASS 0x48 debug1: connect to address 2a0a:4580:103f:c0de::1 port 22: Network unreachable ssh: connect to host codeberg.org port 22: Network unreachable fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. ``` DNS seems to be working, and I can curl the codeberg homepage from within the Pod. Is there anything else I should be checking?

Is it possible this might be a firewall issue on your side? It would be good check if you're able to access Github or Gitlab via SSH.

Is it possible this might be a firewall issue on your side? It would be good check if you're able to access Github or Gitlab via SSH.

That was it, sorry, didn't realise there were outbound rules in place.

Thank you.

That was it, sorry, didn't realise there were outbound rules in place. Thank you.
Sign in to join this conversation.
No Branch/Tag specified
main
No results found.
Labels
Clear labels
accessibility

Reduces accessibility and is thus a "bug" for certain user groups on Codeberg.
bug

Something is not working the way it should. Does not concern outages.
bug
infrastructure

Errors evidently caused by infrastructure malfunctions or outages
Codeberg

This issue involves Codeberg's downstream modifications and settings and/or Codeberg's structures.
contributions welcome

Please join the discussion and consider contributing a PR!
docs

No bug, but an improvement to the docs or UI description will help
duplicate

This issue or pull request already exists
enhancement

New feature
infrastructure

Involves changes to the server setups, use `bug/infrastructure` for infrastructure-related user errors.
legal

An issue directly involving legal compliance
licence / ToS

involving questions about the ToS, especially licencing compliance
please chill
we are volunteers

Please consider editing your posts and remember that there is a human on the other side. We get that you are frustrated, but it's harder for us to help you this way.
public relations

Things related to Codeberg's external communication
question

More information is needed
question
user support

This issue contains a clearly stated problem. However, it is not clear whether we have to fix anything on Codeberg's end, but we're helping them fix it and/or find the cause.
s/Forgejo

Related to Forgejo. Please also check Forgejo's issue tracker.
s/Forgejo/migration

Migration related issues in Forgejo
s/Pages

Issues related to the Codeberg Pages feature
s/Weblate

Issue is related to the Weblate instance at https://translate.codeberg.org
s/Woodpecker

Woodpecker CI related issue
security

involves improvements to the sites security
service

Add a new service to the Codeberg ecosystem (instead of implementing into Gitea)
upstream

An open issue or pull request to an upstream repository to fix this issue (partially or completely) exists (i.e. Gitea, Forgejo, etc.)
wontfix

Codeberg's current set of contributors are not planning to spend time on delegating this issue.
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Codeberg/Community#2179
Reference in a new issue
Codeberg/Community
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?