I have connected to work server through sftp with FileZilla or Sublime Text SFTP plugin many times at home (fiber). I am visiting my parents but i have to do some work here so i copied all of the settings of sublime text and filezilla to my laptop. But, when i try to connect to my work server throght mobile internet (some usb stick from mobile services provider) and some netgear router (usb stick is connected to router) my sftp connection fails on both filezilla and sublime text.

Status: Connectiong to server...
Answer: fzSftp started, protocol_version=8
Com:    open "username@server" 22
Error:  Network error: Connection refused

I am not using ssh key but username and password. What could be the problem?

  • I'd check if the correct IP address is being returned by dns for server. Connection refused is before the authentication phase; it implies your TCP session never started. If you are getting the correct IP address, then either there's a firewall blocking your connection or the server may be down. – Andrew Domaszek Sep 16 '17 at 20:31
  • How do i do that? – user1365447 Sep 17 '17 at 5:30

Here are the things to check:

You are getting refused, which could be wrong server, or a firewall sending a TCP REJECT. So..

  • Check DNS resolution: on the terminal, ping SERVER where SERVER is the DNS name

  • Try to connect to another server you know works. Do you have the same problem, if so, probably a firewall issue.

    • It's not your internal OS firewall, b/c your laptop works fine elsewhere (?).

    • Take the router out of the picture, and go straight from your laptop, repeat same test.

    • If it's still failing, it might be your WWAN ISP. Who is the carrier? I have seen SSH blocked before on LTE, but it's rare.

    • Consider using a professional VPN. Most offer a free month. I used ExpressVPN myself, crazy fast, never have to worry about quirky ISP rules.

| improve this answer | |
  • I did not check the connectivity on my laptop at home. I just copied all sublime text sftp settings and filezilla site infformation to my usb stick. So i am not 100% sure it is the connection. It may also be something with the laptop. But, those same settings worked flawlessly on my PC, So i know that its not that. It is laptop or connection here (router or something) – user1365447 Sep 17 '17 at 5:23
  • I also had a weird problem here once with the same server when i used ftp only - it often disconnected and had trouble connecting AND the files i worked on and tried to upload disappeared from server. The server guy said something about multiple connections open and getting stuff done different times and it was clogging up the connection limit for them. I dont know. So i thought they fixed all of that when they went for sftp. It worked great at home. I dont want to use ftp for the same reason this time. It will probably cause problems (i tried and it often had a lot of trouble connecting) – user1365447 Sep 17 '17 at 5:29

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.