0

For some days I'm experiencing issues with SSH on my machine (I guess after having installed some software that I don't remember).

It's very problematic as I use Git to work on some code projects with other people, pushing my work on a repository via SSH.

I'm 100 % sure the problem is coming from my computer (Linux Mint 16 cinnamon), because:

From the same Internet connection (same router, same IP), I can connect without any problem to the same server with another computer. Therefore, it's not a firewall problem coming from the router.

The admin of the server doesn't see any issues that could create this concern, and everybody else has access as they should.

This is the error message Git tells me:

ssh: connect to host ******* port 22: Connection refused
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

I was told that could be a problem with my iptables, and have tried to sudo iptables -X (and -F), with no luck. I have no idea how to manage this further.

To be honest with you I already posted this issue on the unix & linux stack exchange but with no luck. Here is My post on Unix & Linux stack exchange

I saw a similar post on askubuntu but I coudln't follow the advices as I'm on mint and it seems even If it's based on debian, there are differences to deal with it. Other similar post on askUbuntu

Also I've looked after a solution to restore those ip-tables, to be sure it the problem is there but I've found no way to achieve this.

2
  • Are you sure you have the correct SSH key? Or that you didn't misspell the repository? Mar 2, 2015 at 9:48
  • Yes, I'm sure, because I used to use this repository without any problem till the day I installed those apps It seems. Moreover, git remote -v gives me the right repository. I aswell setted up a repo on github, I can connect & push using https but not with SSH. I added as well my key on github, and my key was as well checked by the admin of the server. So on this point everything is ok. It's probably related to the iptables, but I have no idea on the way I should fix this issue.
    – Azuk
    Mar 2, 2015 at 10:17

1 Answer 1

2

I've finally found a way to fix the issue I had.I found this article about iptables It helped me a lot to fix the issue.

The only thing I did is run the command

sudo iptables -F

Doing that has allowed me to push again on remote repositories and thus using ssh. But I had to save that.

For this I run this other command to make all the changements due to the previous command persistent

sudo apt-get update
sudo apt-get install iptables-persistent

I found that thanks the article linked previously. I rebooted in the meantime and everything is working correctly.

Not the answer you're looking for? Browse other questions tagged .