Hello,
I'm experiencing an issue when trying to push changes to my Git repository hosted via SSH. The error I receive is:
kex_exchange_identification: Connection closed by remote host
Connection closed by 217.197.84.140 port 22
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
I immediately checked the SSH connection manually:
ssh -T git@codeberg.org
kex_exchange_identification: Connection closed by remote host
Connection closed by 217.197.84.140 port 22
Here’s what I’ve confirmed:
- My SSH key is correctly added to my Codeberg account.
- The same SSH key works fine with GitHub.
ssh -T git@github.com returns the expected message.
- The SSH agent is running, and the key is added using
ssh-add.
- My
~/.ssh/config contains the correct settings for Codeberg.
To continue working, I temporarily switched the remote URL to use HTTPS, which works fine — but I would prefer to use SSH as usual.
Is this a known issue with Codeberg’s SSH service? Could it be related to IP blocking or firewall restrictions?
Any help or clarification would be greatly appreciated.
Thank you!
### Comment
Hello,
I'm experiencing an issue when trying to push changes to my Git repository hosted via SSH. The error I receive is:
```bash
kex_exchange_identification: Connection closed by remote host
Connection closed by 217.197.84.140 port 22
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
```
I immediately checked the SSH connection manually:
```bash
ssh -T git@codeberg.org
kex_exchange_identification: Connection closed by remote host
Connection closed by 217.197.84.140 port 22
```
Here’s what I’ve confirmed:
* My SSH key is correctly added to my Codeberg account.
* The same SSH key works fine with GitHub.
* `ssh -T git@github.com` returns the expected message.
* The SSH agent is running, and the key is added using `ssh-add`.
* My `~/.ssh/config` contains the correct settings for Codeberg.
To continue working, I temporarily switched the remote URL to use HTTPS, which works fine — but I would prefer to use SSH as usual.
Is this a known issue with Codeberg’s SSH service? Could it be related to IP blocking or firewall restrictions?
Any help or clarification would be greatly appreciated.
Thank you!