Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I used to connect to connect to my server using OpenSSH using this command:

ssh root@my-server.com

but now I've changed my location, and I can no longer connect, here is the debug report when I use the -v parameter with the ssh command:

ssh root@my-server.com -v

OpenSSH_6.0p1 Debian-3ubuntu1, OpenSSL 1.0.1c 10 May 2012
debug1: Reading configuration data /home/riless/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to my-server.com [xx.xxx.xxx.xx] port 22.
debug1: Connection established.
debug1: identity file /home/riless/.ssh/id_rsa type 1
debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048
debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048
debug1: identity file /home/riless/.ssh/id_rsa-cert type -1
debug1: identity file /home/riless/.ssh/id_dsa type -1
debug1: identity file /home/riless/.ssh/id_dsa-cert type -1
debug1: identity file /home/riless/.ssh/id_ecdsa type -1
debug1: identity file /home/riless/.ssh/id_ecdsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3
debug1: match: OpenSSH_5.3 pat OpenSSH_5*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.0p1 Debian-3ubuntu1
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP

and after a while, it outputs me this:

Connection closed by xx.xxx.xxx.xx

Notes: PuTTY works normally, but not OpenSSH; I'm on Ubuntu

EDIT1: content of /etc/ssh/ssh_config file (without the commented lines):

Host *
    SendEnv LANG LC_*
    HashKnownHosts yes
    GSSAPIAuthentication yes
    GSSAPIDelegateCredentials no

content of /home/riless/.ssh/config file:

Host xx.xxx.xxx.xx
User root
Port 22
Hostname xx.xxx.xxx.xx
IdentityFile ~/.ssh/id_rsa
TCPKeepAlive yes
IdentitiesOnly yes

EDIT2: whene I try to change Ciphers using this command line:

ssh root@70.32.72.141 -c aes256-ctr -v

it prompt me for password, but the console freezes just after that:

root@xx.xx.xx.xxx's password: 
debug1: Authentication succeeded (password).
Authenticated to xx.xx.xx.xxx ([xx.xx.xx.xxx]:22).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LC_PAPER = fr_FR.UTF-8
debug1: Sending env LC_ADDRESS = fr_FR.UTF-8
debug1: Sending env LC_MONETARY = fr_FR.UTF-8
debug1: Sending env LC_NUMERIC = fr_FR.UTF-8
debug1: Sending env LC_TELEPHONE = fr_FR.UTF-8
debug1: Sending env LC_IDENTIFICATION = fr_FR.UTF-8
debug1: Sending env LANG = en_US.UTF-8
debug1: Sending env LC_MEASUREMENT = fr_FR.UTF-8
debug1: Sending env LC_TIME = fr_FR.UTF-8
debug1: Sending env LC_NAME = fr_FR.UTF-8
share|improve this question
    
Contents for /etc/ssh/ssh_config and /home/riless/.ssh/config? –  Bart De Vos Sep 12 '13 at 12:39

2 Answers 2

You most likely have a limitation in place for the source connection of the root user in your /root/.ssh/authorized_keys file.

Specifically, your authorized_keys probably looks like this:

from="trusted.host.some.domain.ext,10.0.0.*,:*.untrusted.network.ext" ssh-rsa [your key] root@localhost

If you connection doesn't macth the "from" pattern of if it's explicitly excluded from that pattern, the connection will be denied.

share|improve this answer
    
It Works with PuTTY, It's not a limitation of place. –  Ghilas BELHADJ Sep 15 '13 at 9:41
up vote 0 down vote accepted

I've just added a line in the /etc/ssh/ssh_config referring to many forums.

Ciphers arcfour

Now, I can connect to the server, but there is still some issues: The console freezes when I run somme commands like vim, htop

UPDATE: I've found a solution for this, but don't know how does this works.

Just set the MTU on your ethernet or wireless interface to something really small.

sudo ifconfig wlan0 mtu 1100  # (or eth0 for ethernet)
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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