Pb SSH

Salut tout le monde,

J’ai un petit problème avec SSH lorsque je me connecte

Sous debian 7.7 aucun problème
Sous debian 8.0 j’ai l’erreur ci dessous
!Error: Key exchange initilization.

Auriez vous une idée du problème ?

Salut,

[quote=“gody”]Sous debian 8.0 j’ai l’erreur ci dessous
!Error: Key exchange initilization.[/quote]

C’est un peu short comme descriptif, non ?

[mono]ssh d’ici «–» la bas[/mono]

Le contexte ?
Des retours consoles ?
Des logs ?
En mode debug (-v) ?

Salut,

Je sais bien que c’est short…

Le contexte ? Connexion SSH avec un client Windows ( TTY emulator )
Des retours consoles ?

Des logs ?
Serveur: A la tentative de connexion non, par contre lorsque je ferme la console, j’obtiens

Client:

2014-11-14 13:15:31,921 [INFO ][SSHProtocol ] ---<<< Parsing packet type SSH2_MSG_KEXINIT (20/0x14) (status:SSH2_STATUS_KEXINIT (15)) 2014-11-14 13:15:31,921 [INFO ][SSHProtocol ] Key renegociation 1... 2014-11-14 13:15:31,921 [DEBUG][SSHProtocol ] Current status: SSH2_STATUS_KEXINIT (15) 2014-11-14 13:15:31,921 [INFO ][SSHProtocol ] Checking for SSH2_MSG_KEXINIT packet... 2014-11-14 13:15:31,921 [DEBUG][SSHProtocol ] Traitement SSH2ParseMSG_KEXINIT Length=936 Packet type=SSH2_MSG_KEXINIT (20/0x14)... 2014-11-14 13:15:31,921 [INFO ][SSHProtocol ] Server algorithms available: 2014-11-14 13:15:31,921 [INFO ][SSHProtocol ] key exchange algorithms : curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1 2014-11-14 13:15:31,921 [INFO ][SSHProtocol ] host key algorithms : ssh-rsa,ssh-dss,ecdsa-sha2-nistp256 2014-11-14 13:15:31,921 [INFO ][SSHProtocol ] client->server encryption algorithms : aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com 2014-11-14 13:15:31,921 [INFO ][SSHProtocol ] server->client encryption algorithms : aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com 2014-11-14 13:15:31,921 [INFO ][SSHProtocol ] client->server MAC algorithms : umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1 2014-11-14 13:15:31,921 [INFO ][SSHProtocol ] server->client MAC algorithms : umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1 2014-11-14 13:15:31,921 [INFO ][SSHProtocol ] client->server compression algorithms : none,zlib@openssh.com 2014-11-14 13:15:31,921 [INFO ][SSHProtocol ] server->client compression algorithms : none,zlib@openssh.com 2014-11-14 13:15:31,921 [INFO ][SSHProtocol ] client->server languages : [None] 2014-11-14 13:15:31,921 [INFO ][SSHProtocol ] server->client languages : [None] 2014-11-14 13:15:31,921 [INFO ][SSHProtocol ] Choosing algorithms... 2014-11-14 13:15:31,921 [ERROR][SSHProtocol ] Unable to match a key exchange algorithm.

Unable to match a key exchange algorithm.
Y’a t-il eu un changement dans les algos entre 8.0 et 7.7 ?

Salut,

Entre ces deux versions, oui.
Mais visiblement c’est ton (?) client (Putty, Cygwin, TTSSH1, TTSSH2, WinSCP, FileZilla … ? en version ?) qui pose problème.
Est-ce le seul client ?

[mono]$ man ssh[/mono]

[quote][…]
-o option
Can be used to give options in the format used in the configuration file.
This is useful for specifying options for which there is no separate command-line flag.
For full details of the options listed below, and their possible values, see ssh_config(5).
[…]
KexAlgorithms
[…]
[/quote]

[mono]$ man ssh_config[/mono]

[quote][…]
KexAlgorithms
Specifies the available KEX (Key Exchange) algorithms.
Multiple algorithms must be comma-separated. The default is:

               ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,
               diffie-hellman-group-exchange-sha256,
               diffie-hellman-group-exchange-sha1,
               diffie-hellman-group14-sha1,
               diffie-hellman-group1-sha1

[…]
[/quote]
[mono]$ man openssh[/mono] voir également : SSH protocol version xxx.

[quote]KexAlgorithms
Specifies the available KEX (Key Exchange) algorithms. Multiple algorithms must be comma-separated. The supported algorithms are:

    [curve25519-sha256@libssh.org](mailto:curve25519-sha256@libssh.org)
    diffie-hellman-group1-sha1
    diffie-hellman-group14-sha1
    diffie-hellman-group-exchange-sha1
    diffie-hellman-group-exchange-sha256
    ecdh-sha2-nistp256
    ecdh-sha2-nistp384
    ecdh-sha2-nistp521

The default is:

[curve25519-sha256@libssh.org](mailto:curve25519-sha256@libssh.org), 
ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521, 
diffie-hellman-group-exchange-sha256, 
diffie-hellman-group14-sha1[/quote]

Quels sont ces retours ?

$ ssh -v user@xx.xx.xx.xx $ ssh -v -o KexAlgorithms=diffie-hellman-group14-sha1 user@xx.xx.xx.xx $ ssh -v -m hmac-sha1 -c aes128-cbc -o KexAlgorithms=diffie-hellman-group14-sha1 -o HostKeyAlgorithms=ssh-rsa user@xx.xx.xx.xx
À la suite de quoi, si ta connexion s’établit et se ferme sans broncher, j’entrevois (selon si, il est le seul client à joindre) deux solutions.
[ul][li] informé le fichier [mono]/etc/ssh/sshd_config[/mono][/li]
[li] créé un alias en ton [mono]/home/user/.bashrc[/mono] solution qui serait très certainement la plus adéquate.[/li][/ul]

Nous en reparlerons après.