Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

Connection sftp sur serveur

2 réponses
Avatar
Alain Chappuis
Bonjour,
J'ai un problème de connection sur mes serveurs Linux SuSE!

Je tente une connection: sftp chappuis@cmulnx3 et j'obtiens la
réponse suivante:

Connecting to cmulnx3...
Received message too long 1114203502

puis retour case départ. Je ne comprend pas ce qu'il m'arrive,
j'ai ouvert le parre-feux pour ssh pourtant.

Si je le fais en mode verbose:
(..)
debug1: Connection established.
debug2: key_type_from_name: unknown key type '-----BEGIN'
debug2: key_type_from_name: unknown key type '-----END'
debug1: identity file /home/chappuis/.ssh/id_rsa type 1
debug2: key_type_from_name: unknown key type '-----BEGIN'
debug2: key_type_from_name: unknown key type '-----END'
debug1: identity file /home/chappuis/.ssh/id_dsa type 2
debug1: Remote protocol version 1.99, remote software version OpenSSH_4.2
debug1: match: OpenSSH_4.2 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_3.7.1p2
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug2: kex_parse_kexinit:
diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
debug2: kex_parse_kexinit:
aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit:
aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit:
hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit:
hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: kex_parse_kexinit:
diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
debug2: kex_parse_kexinit:
aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit:
aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit:
hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit:
hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib@openssh.com
debug2: kex_parse_kexinit: none,zlib@openssh.com
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: mac_init: found hmac-md5
debug1: kex: server->client aes128-cbc hmac-md5 none
debug2: mac_init: found hmac-md5
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug2: dh_gen_key: priv key bits set: 123/256
debug2: bits set: 1031/2048
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'cmulnx3' is known and matches the RSA host key.
debug1: Found key in /home/chappuis/.ssh/known_hosts:37
debug2: bits set: 1038/2048
debug1: ssh_rsa_verify: signature correct
debug2: kex_derive_keys
debug2: set_newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug2: set_newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug2: key: /home/chappuis/.ssh/id_rsa (16d0d8)
debug2: key: /home/chappuis/.ssh/id_dsa (16d0f0)
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Offering public key: /home/chappuis/.ssh/id_rsa
debug2: we sent a publickey packet, wait for reply
debug1: Server accepts key: pkalg ssh-rsa blen 149
debug2: input_userauth_pk_ok: fp 19:78:a0:6e:11:19:2c:66:1d:b7:26:44:d0:58:1d:0c
debug1: read PEM private key done: type RSA
debug1: Authentication succeeded (publickey).
debug2: fd 5 setting O_NONBLOCK
debug2: fd 6 is O_NONBLOCK
debug1: channel 0: new [client-session]
debug2: channel 0: send open
debug1: Entering interactive session.
debug2: callback start
debug2: ssh_session2_setup: id 0
debug1: Sending subsystem: sftp
debug2: channel 0: request subsystem
debug2: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768
debug2: channel 0: rcvd adjust 131072
Received message too long 1114203502
chappuis(...): debug2: channel 0: read<=0 rfd 5 len 0
debug2: channel 0: read failed
------------------------
Est-ce que quelqu'un peut-il m'aider?

Merci par avance.
Alain
--
Alain Chappuis (Remove: pouriel to answer me in my address!)
(Enlevez: pouriel de mon adresse pour me répondre!)

2 réponses

Avatar
Philippe WEILL
Alain Chappuis wrote:
Bonjour,
J'ai un problème de connection sur mes serveurs Linux SuSE!

Je tente une connection: sftp et j'obtiens la
réponse suivante:

Connecting to cmulnx3...
Received message too long 1114203502




ca c'est typiquement un probleme de fichier d'initialisation shell
qui ecrit sur la console ( .bashrc , .cshrc ....)

puis retour case départ. Je ne comprend pas ce qu'il m'arrive,
j'ai ouvert le parre-feux pour ssh pourtant.


Est-ce que quelqu'un peut-il m'aider?

Merci par avance.
Alain


Avatar
Alain Chappuis
Alain Chappuis wrote:

Bonjour,
J'ai un problème de connection sur mes serveurs Linux SuSE!

Je tente une connection: sftp et j'obtiens la
réponse suivante:

Connecting to cmulnx3...
Received message too long 1114203502



J'ai trouvé! Google serviteur a encore parlé.

http://www.snailbook.com/faq/sftp-corruption.auto.html

In order for this to work, the SSH session must be "clean" — that is, it must
have on it only information transmitted by the programs at either end. What
often happens, though, is that there are statements in either the system or
per-user shell startup files on the server (.bashrc, .profile, /etc/csh.cshrc,
.login, etc.) which output text messages on login, intended to be read by humans
(like fortune, echo "Hi there!", etc.). Such code should only produce output on
interactive logins, when there is a tty attached to standard input. If it does
not make this test, it will insert these text messages where they don't belong:
in this case, polluting the protocol stream between scp2/sftp and sftp-server.
The first four bytes of the text gets interpreted as a 32-bit packet length,
which will usually be a wildly large number, provoking the error message above.
Notice that:

1416586337 decimal = 546F6461 hex = "Toda" ASCII

suggesting a string beginning "Today..." (or maybe "Thank-you" in transliterated
Hebrew).

Ce qui m'a mis sur la piste c'est:

ssh server -s -oForwardX11=no -oForwardAgent=no -oProtocol=2 sftp

et dans mon fichier /etc/ssh/ssh_config mes deux lignes
ForwardX11=yes
ForwardAgent=yes
Remplacées par no et tout baigne...

ca c'est typiquement un probleme de fichier d'initialisation shell
qui ecrit sur la console ( .bashrc , .cshrc ....)


Juste!

Est-ce que quelqu'un peut-il m'aider?



Merci pour l'aide apportée!

Alain
--
Alain Chappuis (Remove: pouriel to answer me in my address!)
(Enlevez: pouriel de mon adresse pour me répondre!)