0

After I booted up my system today, I can't connect using ssh to a debian server. Here is the result of running ssh with -vvv

ssh xxx@ssh.xxx.com -vvv
OpenSSH_7.1p1, OpenSSL 1.0.2d 9 Jul 2015
debug1: Reading configuration data /etc/ssh/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to ssh.xxx.com [ip] port 22.
debug1: connect to address ip port 22: Connection refused
ssh: connect to host ssh.xxx.com port 22: Connection refused

netstat

$sudo netstat -tulpen | grep ":22"

tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      0          26630      2812/sshd           
tcp6       0      0 :::22                   :::*                    LISTEN      0          26632      2812/sshd

I also tried running ssh using a different port after adding it to ssh config to no avail.

The next thing I did is to try to ssh using putty in a windows vm but it also showed an error "Network error: connection refused"

Yesterday morning I was able to connect using ssh on the same machine and everything was normal.

I can ping the server normally, I can open rutorrent web-interface from my browser (rtorrent is installed on the server).

All the ports I'm trying to connect through are open.

I tried to ssh into a different server and it worked.

I guess the problem is on the server side, I don't have root access to the server, but multiple admins checked if my ip is being blacklisted or denied and it's not could there be anything leading to this.

I tried to connect using a browser-based web SSH client console from the description:

from it's description

It can be used to bypass firewalls and proxies on a secure HTTP connection. Moreover, the consoleFISH makes it possible to anonymously open SSH connections as the IP address of the connecting web client is not sent to the remote system.

so it's definitely an IP issue, if my IP is not in a ban list (the server uses fail2ban), what other place might be refusing or blocking my IP on the server.

  • Have you tried the connection from other host? Checkout iptables also if the connection to port 22 is ACCEPTED from your IP address – tachomi Sep 20 '15 at 22:15
  • I tried to connect to that specific server with the console web-based ssh client, and the connection went fine. I also tried to ssh into another server from my current machine using port 22 and connection also was ok. – heu Sep 20 '15 at 22:21
  • If you can, try accepting the connection to port 22 from your ip with iptables $ iptables -A INPUT -s [your ip] -p tcp --dport 22 -j ACCEPT – tachomi Sep 20 '15 at 23:16
  • Since you have connectivity to the server, this is almost certainly going to be a problem on the server side. Possibilities include: firewalls, change in sshd config, sshd not running, etc. – Brandon Xavier Sep 21 '15 at 1:28
  • @BrandonXavier If the problem is on the server side, why is the connection through the web based client going through normally ? – heu Sep 21 '15 at 2:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.