0

I can access ssh servers when I am connected through wifi or LAN, but not through a wireless broadband usb modem. I get this message:

ssh_exchange_identification: Connection closed by remote host

I know this question has been asked before, but I haven't seen in old questions the problem occurring only for a certain type of connection as in my case. I tried several answers but none seems to work. I don't have the files /etc/hosts.allow and /etc/hosts.deny and if I try to create it I find that I don't have permissions.

Here is the verbose output. I removed the URL and IP, and the duplicates of "debug3: key_read: missing keytype"

OpenSSH_5.2p1, OpenSSL 0.9.8y 5 Feb 2013
debug1: Reading configuration data /etc/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to URL [IP] port 22.
debug1: Connection established.
debug1: identity file /Users/Tarek/.ssh/identity type -1
debug3: Not a RSA1 key file /Users/Tarek/.ssh/id_rsa.
debug2: key_type_from_name: unknown key type '-----BEGIN'
debug3: key_read: missing keytype
debug3: key_read: missing whitespace
debug2: key_type_from_name: unknown key type '-----END'
debug3: key_read: missing keytype
debug1: identity file /Users/Tarek/.ssh/id_rsa type 1
debug1: identity file /Users/Tarek/.ssh/id_dsa type -1
ssh_exchange_identification: Connection closed by remote host
2
  • 1) verbose output from from ssh -vvv remote should give you more clue about the error.
    – Jakuje
    Oct 6, 2015 at 19:20
  • @Jakuje Please note the updated question
    – Tarek
    Oct 7, 2015 at 18:07

1 Answer 1

1

If I am right, that it MTU problem. Your modem is probably not setting MTU correctly and throws away some of large packets. More info is described here: http://www.snailbook.com/faq/mtu-mismatch.auto.html

Answer: Try to decrease MTU on your interface on both client and server

3
  • Thanks for the answer! How can I change MTU on the server or at least know it so that I set my own MTU to be the same, if this would help?
    – Tarek
    Oct 7, 2015 at 19:35
  • it is described in the link: ifconfig eth0 mtu 1000 for example.
    – Jakuje
    Oct 7, 2015 at 19:38
  • I mean how I can run this command on the server interface. I decreased the MTU on my side only but this didn't solve the problem.
    – Tarek
    Oct 7, 2015 at 19:50

You must log in to answer this question.

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