I have a remote server and I was able to connect via ssh to it but some they I could not any more! I ssh to server with my laptop and my android phone but from some day every time I am trying and the message is connection closed by server.

But EVERY OTHER devices or computers are able to connect!!!

I removed saved key in my phone and tried it again and it worked but my ubuntu laptop is still unable to connect.

I have done restarting and re-installing ssh service(ssh and openssh-client) on my ubuntu laptop. I have removed any config folder(~/.ssh and /etc/ssh) and reinstalled on my ubuntu laptop but nothing!

sudo ufw status is inactive for both client and server

/etc/hosts.allow and /etc/hosts.deny are empty for both client and server

Also I use port forwarding sometimes on ubuntu machine ( ssh sb@sth -D <port> )

PLEASE help me!! :'(

Edit: I connect by password not key

The problem is only with openssh-client and the others like putty work well

The verbose output is:

OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
debug1: Connecting to blablabla port 22.
debug1: Connection established.
debug1: identity file /home/amir/.ssh/id_rsa type -1
debug1: identity file /home/amir/.ssh/id_rsa-cert type -1
debug1: identity file /home/amir/.ssh/id_dsa type -1
debug1: identity file /home/amir/.ssh/id_dsa-cert type -1
debug1: identity file /home/amir/.ssh/id_ecdsa type -1
debug1: identity file /home/amir/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/amir/.ssh/id_ed25519 type -1
debug1: identity file /home/amir/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1p1 Ubuntu-2ubuntu2
debug1: match: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2 pat OpenSSH_6.6.1* compat 0x04000000
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5-etm@openssh.com none
debug1: kex: client->server aes128-ctr hmac-md5-etm@openssh.com none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY

The server-side is: OpenSSH_6.6.1p1 Ubuntu-2ubuntu, OpenSSL 1.0.1f 6 Jan 2014

  • 1
    It would be useful to know what error messages you get, if any, and by what means you intend to authenticate (password? key?). – dhag Mar 20 '15 at 17:48
  • @dhag by password and I have added verbose result to my question – Amir Hossein Jamsidi Mar 21 '15 at 8:30
  • You said, you used your phone and laptop to ssh to the remote server..Is your phone and laptop are on the same network? – vipin kumar Mar 21 '15 at 9:38
  • @AmirHosseinJamsidi: what's the version of the SSH server? I ask that because if the version difference was too big I encountered crashes. – 0xC0000022L Mar 21 '15 at 10:43
  • @vipinkumar Yes all my devices are in the same network – Amir Hossein Jamsidi Mar 21 '15 at 10:52

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.