1

I can log in to my Ubuntu server via SSH from anywhere in my local network, but I cannot from the internet. When I attempt to, It requests my username, displays the banner, and prompts for the password. But when I enter the password, the SSH server hangs and freezes.

I have tested this using Putty, the SSH in another Linux server, and ConnectBot for Android. All of them have this problem. The auth.log file says that the connection is going through, and that the password is accepted, but the client sees nothing, and eventually disconnects. The auth.log just says this is a normal disconnect. If it helps, I know that I can access the Apache2 website running on it, so connection is happening. I have seen several other posts about this, but none of them gave any serious help.

Any help?

The output from ssh -v is

OpenSSH_6.7p1, OpenSSL 1.0.1j 15 Oct 2014
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to 50.168.183.239 [50.168.183.239] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /home/nitsua_revaew/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/nitsua_revaew/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/nitsua_revaew/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/nitsua_revaew/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/nitsua_revaew/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/nitsua_revaew/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/nitsua_revaew/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/nitsua_revaew/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.7
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1p1 Ubuntu-8
debug1: match: OpenSSH_6.6.1p1 Ubuntu-8 pat OpenSSH_6.6.1* compat 0x04000000
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr umac-64-etm@openssh.com none
debug1: kex: client->server aes128-ctr umac-64-etm@openssh.com none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ECDSA d2:84:4a:6e:f4:a6:85:75:95:28:59:62:a7:d0:93:4a
debug1: Host '50.168.183.239' is known and matches the ECDSA host key.
debug1: Found key in /home/nitsua_revaew/.ssh/known_hosts:1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
__        _    _
\ \      / /__| | ___ ___  _ __ ___   ___
 \ \ /\ / / _ \ |/ __/ _ \| '_ ` _ \ / _ \
  \ V  V /  __/ | (_| (_) | | | | | |  __/
   \_/\_/ \___|_|\___\___/|_| |_| |_|\___|

                    to
               Austin's Server


           Enjoy Your Stay
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Trying private key: /home/nitsua_revaew/.ssh/id_rsa
debug1: Trying private key: /home/nitsua_revaew/.ssh/id_dsa
debug1: Trying private key: /home/nitsua_revaew/.ssh/id_ecdsa
debug1: Trying private key: /home/nitsua_revaew/.ssh/id_ed25519
debug1: Next authentication method: password
austin@50.168.183.239's password:

After I login, it shows

Authenticated to 50.168.183.239 ([50.168.183.239]:22).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.

Then it freezes. Any ideas?

  • Please define "it crashes": 1. the server goes into a kernel panic and does a core dump. 2. the SSH server crashes/hangs 3. the entire server hangs and must be hard-booted. 4. you just get disconnected and everything works as before. – Fabby Dec 4 '14 at 23:06
  • Sorry, I miswrote. I didn't mean to say "it crashes". What it does is not send anything to the client, making it seem like it has frozen. Some of the clientside ssh programs disconnect automatically when they don't recieve anything for a while, so the connection is closed. On the serverside, it appears as though they logged in, did nothing, then left. – Wintermute Dec 5 '14 at 4:03
  • I've edited your question and upvoted it to attract some people more experienced in SSH then me. – Fabby Dec 5 '14 at 10:35
  • Please connect using ssh -v, and post the output. – muru Dec 5 '14 at 10:48
  • I have done so. – Wintermute Dec 11 '14 at 14:18
0

Sounds like port 22 is blocked. Depending on where you are running your server from there are several options. The first is accessing your router and unblocking port 22. You could also try running ssh from port 80.

ssh -p 80 myserver.net

btw, what kind of address are you using to access your server? If you are using an IP address make sure you are not using the local network IP (They usually start with 192.)

  • I have port forwarded port 22. Is that what you mean? I am using the external IP. – Wintermute Dec 5 '14 at 14:45

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.