tags:

views:

297

answers:

1

I've changed ssh port number from 22 to 2222 The previous setup connection to default ssh port 22 is fine I've Mapped the NAT on the router correctly

When i try debug it

ssh -v -p2222 www.example.com

I get this error hanging

debug1: SSH2_MSG_KEXINIT

Below is all debug log

bob@server:~$ ssh -v -p2222 www.example.com
OpenSSH_4.7p1 Debian-8ubuntu1.2, OpenSSL 0.9.8g 19 Oct 2007
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to www.example.com [100.100.100.100] port 2222.
debug1: Connection established.
debug1: identity file /home/bob/.ssh/identity type -1
debug1: identity file /home/bob/.ssh/id_rsa type -1
debug1: identity file /home/bob/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.7p1 Debian-8ubuntu1.2
debug1: match: OpenSSH_4.7p1 Debian-8ubuntu1.2 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.7p1 Debian-8ubuntu1.2
debug1: SSH2_MSG_KEXINIT sent
Connection closed by 100.100.100.100

Just like that connection get closed i used gnome-terminal, putty, securecrt on couple machines in and outside the network still all get the same error

A: 

SSH2_MSG_KEXINIT is not an error. It's just telling you that it's beginning the ssh key exchange process.

If the other end is closing the connection at that point, apparently it doesn't like you for some reason :-) Do you have access to logs on the server you're connecting to? That may have information about why the connection is being shut down precipitously. (tcpwrappers, for example)

David Gelhar
unfortunately no, i can't access the logs :<