[Réglé] ssh vers serveur distant impossible

Démarré par Guillaume B, 04 Juin 2019 à 13:54:44

« précédent - suivant »

0 Membres et 1 Invité sur ce sujet

Bonjour,

Tout nouvel abonné, je suis surpris de ne pas pouvoir effectuer de connexion ssh depuis mon réseau local vers une dedibox.
Y aurait-il un paramétrage quelconque à faire ?

J'ai bien tenté de faire écouter ma dedibox sur d'autres ports que le 22 mais rien n'y fait.
Chose étrange, un telnet sur le port 22 fonctionne et me montre bien que j'ai un service ssh qui répond...

$ telnet **ma.dedibox** 22 
Trying **IP.DE.DI.BOX**...
Connected to **ma.dedibox**.
Escape character is '^]'.
SSH-2.0-OpenSSH_6.7p1 Debian-5+deb8u8
^C
Connection closed by foreign host.

$ ssh **ma.dedibox**
packet_write_wait: Connection to **IP.DE.DI.BOX** port 22: Broken pipe


Merci pour vos éventuelles lumières.

Guillaume

Hello,

Aucun souci pour faire du SSH chez K-Net, tu as essayé d'autres serveurs que ta dédibox ?

Citation de: Hugues le 04 Juin 2019 à 14:16:59
Hello,

Aucun souci pour faire du SSH chez K-Net, tu as essayé d'autres serveurs que ta dédibox ?
Bonjour,
Je confirme aucun souci pour faire du SSH(Online - Vultr - Infomaniak) avec les deux versions blanches de la KBOX.

CitationSSH-2.0-OpenSSH_6.7p1 Debian-5+deb8u8
Debian 5 !?

Cordialement

Ha, c'est embarrassant en effet. Cela ne semble pas lié à la machine distante, j'ai testé avec d'autres serveurs, même chez github :

$ ssh -T git@github.com
packet_write_wait: Connection to 140.82.118.4 port 22: Broken pipe

$ telnet github.com 22
Trying 140.82.118.4...
Connected to github.com.
Escape character is '^]'.
SSH-2.0-babeld-5d7a90eb

Connection closed by foreign host.

Vous avez quelle Box ? (Blanche ou Noire)

J'ai la box blanche. Pour me moment je n'ai pas encore mis la box tv sur le réseau.

#6
Ici https://bgp.he.net
Ça affiche bien Your ISP is AS24904 (K-NET SARL)

Oui tout a fait.

Plus d'infos sur le ssh, si ça peut aider à comprendre :
# ssh -T -vvv git@github.com
OpenSSH_7.9p1, LibreSSL 2.7.3
debug1: Reading configuration data /Users/guillaume/.ssh/config
debug1: /Users/guillaume/.ssh/config line 1: Applying options for *
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 48: Applying options for *
debug1: Connecting to github.com port 22.
debug1: Connection established.
debug1: identity file /Users/guillaume/.ssh/id_rsa type 0
debug1: identity file /Users/guillaume/.ssh/id_rsa-cert type -1
debug1: identity file /Users/guillaume/.ssh/id_dsa type 1
debug1: identity file /Users/guillaume/.ssh/id_dsa-cert type -1
debug1: identity file /Users/guillaume/.ssh/id_ecdsa type -1
debug1: identity file /Users/guillaume/.ssh/id_ecdsa-cert type -1
debug1: identity file /Users/guillaume/.ssh/id_ed25519 type -1
debug1: identity file /Users/guillaume/.ssh/id_ed25519-cert type -1
debug1: identity file /Users/guillaume/.ssh/id_xmss type -1
debug1: identity file /Users/guillaume/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.9
debug1: Remote protocol version 2.0, remote software version babeld-5d7a90eb
debug1: no match: babeld-5d7a90eb
debug3: fd 5 is O_NONBLOCK
debug1: Authenticating to github.com:22 as 'git'
debug3: hostkeys_foreach: reading file "/Users/guillaume/.ssh/known_hosts"
debug3: record_hostkey: found key type RSA in file /Users/guillaume/.ssh/known_hosts:192
debug3: load_hostkeys: loaded 1 keys from github.com
debug3: order_hostkeyalgs: prefer hostkeyalgs: rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,rsa-sha2-512,rsa-sha2-256,ssh-rsa
debug3: send packet: type 20
debug1: SSH2_MSG_KEXINIT sent
debug3: receive packet: type 20
debug1: SSH2_MSG_KEXINIT received
debug2: local client KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,ext-info-c
debug2: host key algorithms: rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,rsa-sha2-512,rsa-sha2-256,ssh-rsa,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-ed25519-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519
debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
debug2: MACs ctos: 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
debug2: MACs stoc: 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
debug2: compression ctos: none,zlib@openssh.com,zlib
debug2: compression stoc: none,zlib@openssh.com,zlib
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug2: peer server KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256
debug2: host key algorithms: ssh-dss,rsa-sha2-512,rsa-sha2-256,ssh-rsa
debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc
debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc
debug2: MACs ctos: hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,zlib,zlib@openssh.com
debug2: compression stoc: none,zlib,zlib@openssh.com
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: rsa-sha2-512
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug3: send packet: type 30
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug3: receive packet: type 31
debug1: Server host key: ssh-rsa SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8
debug3: hostkeys_foreach: reading file "/Users/guillaume/.ssh/known_hosts"
debug3: record_hostkey: found key type RSA in file /Users/guillaume/.ssh/known_hosts:192
debug3: load_hostkeys: loaded 1 keys from github.com
debug3: hostkeys_foreach: reading file "/Users/guillaume/.ssh/known_hosts"
debug3: record_hostkey: found key type RSA in file /Users/guillaume/.ssh/known_hosts:335
debug3: load_hostkeys: loaded 1 keys from 140.82.118.4
debug1: Host 'github.com' is known and matches the RSA host key.
debug1: Found key in /Users/guillaume/.ssh/known_hosts:192
debug3: send packet: type 21
debug2: set_newkeys: mode 1
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug3: receive packet: type 21
debug1: SSH2_MSG_NEWKEYS received
debug2: set_newkeys: mode 0
debug1: rekey after 134217728 blocks
debug1: Skipping ssh-dss key /Users/guillaume/.ssh/id_dsa - not in PubkeyAcceptedKeyTypes
debug1: Will attempt key: /Users/guillaume/.ssh/id_rsa RSA SHA256:ikVaqvvThqk0AAAMrf9ZfG7Ip0yktFOw5M/89CwinFs agent
debug1: Will attempt key: guillaume@mbp-guillaume.local RSA SHA256:iEJNkLLFe6p3yAoROT3m7lX7HZDyoUqtb7KZ6HOe0tk agent
debug1: Will attempt key: /Users/guillaume/.ssh/id_ecdsa
debug1: Will attempt key: /Users/guillaume/.ssh/id_ed25519
debug1: Will attempt key: /Users/guillaume/.ssh/id_xmss
debug2: pubkey_prepare: done
debug3: send packet: type 5
debug3: receive packet: type 7
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-rsa,rsa-sha2-512,rsa-sha2-256,ssh-dss>
debug3: receive packet: type 6
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug3: send packet: type 50
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey
debug3: start over, passed a different list publickey
debug3: preferred publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering public key: /Users/guillaume/.ssh/id_rsa RSA SHA256:ikVaqvvThqk0AAAMrf9ZfG7Ip0yktFOw5M/89CwinFs agent
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 60
debug1: Server accepts key: /Users/guillaume/.ssh/id_rsa RSA SHA256:ikVaqvvThqk0AAAMrf9ZfG7Ip0yktFOw5M/89CwinFs agent
debug3: sign_and_send_pubkey: RSA SHA256:ikVaqvvThqk0AAAMrf9ZfG7Ip0yktFOw5M/89CwinFs
debug3: sign_and_send_pubkey: signing using rsa-sha2-512
debug3: send packet: type 50
debug3: receive packet: type 52
debug1: Authentication succeeded (publickey).
Authenticated to github.com ([140.82.118.4]:22).
debug1: channel 0: new [client-session]
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug3: send packet: type 90
debug1: Entering interactive session.
debug1: pledge: network
debug3: receive packet: type 91
debug2: channel_input_open_confirmation: channel 0: callback start
debug1: Requesting authentication agent forwarding.
debug2: channel 0: request auth-agent-req@openssh.com confirm 0
debug3: send packet: type 98
debug2: fd 5 setting TCP_NODELAY
debug3: ssh_packet_set_tos: set IP_TOS 0x20
debug2: client_session2_setup: id 0
debug1: Sending environment.
debug3: Ignored env TERM_SESSION_ID
debug3: Ignored env SSH_AUTH_SOCK
debug3: Ignored env Apple_PubSub_Socket_Render
debug3: Ignored env COLORFGBG
debug3: Ignored env ITERM_PROFILE
debug3: Ignored env XPC_FLAGS
debug1: Sending env LANG = fr_FR.UTF-8
debug2: channel 0: request env confirm 0
debug3: send packet: type 98
debug3: Ignored env PWD
debug3: Ignored env SHELL
debug3: Ignored env TERM_PROGRAM_VERSION
debug3: Ignored env TERM_PROGRAM
debug3: Ignored env PATH
debug3: Ignored env DISPLAY
debug3: Ignored env COLORTERM
debug3: Ignored env TERM
debug3: Ignored env HOME
debug3: Ignored env TMPDIR
debug3: Ignored env USER
debug3: Ignored env XPC_SERVICE_NAME
debug3: Ignored env LOGNAME
debug3: Ignored env __CF_USER_TEXT_ENCODING
debug3: Ignored env ITERM_SESSION_ID
debug3: Ignored env SHLVL
debug3: Ignored env OLDPWD
debug3: Ignored env ZSH
debug3: Ignored env PAGER
debug3: Ignored env LESS
debug1: Sending env LC_CTYPE = fr_FR.UTF-8
debug2: channel 0: request env confirm 0
debug3: send packet: type 98
debug3: Ignored env LSCOLORS
debug3: Ignored env SPACESHIP_VERSION
debug3: Ignored env SPACESHIP_ROOT
debug3: Ignored env EDITOR
debug3: Ignored env HISTSIZE
debug3: Ignored env HISTCONTROL
debug3: Ignored env _
debug2: channel 0: request shell confirm 1
debug3: send packet: type 98
debug2: channel_input_open_confirmation: channel 0: callback done
debug2: channel 0: open confirm rwindow 32000 rmax 35000
debug3: send packet: type 1
packet_write_wait: Connection to 140.82.118.4 port 22: Broken pipe

Votre client SSH, vous ne le lanceriez pas d'une VM VMware Workstation ? (Il y a un bug connu dans OpenSSH >= 7.8 avec VMware Workstation qui provoque ce problème)

Citation de: Vincent O le 04 Juin 2019 à 15:15:43
Votre client SSH, vous ne le lanceriez pas d'une VM VMware Workstation ? (Il y a un bug connu dans OpenSSH >= 7.8 avec VMware Workstation qui provoque ce problème)
Nop, j'utilise le Terminal ou iTerm depuis macos, à jour.

Citation de: Guillaume B le 04 Juin 2019 à 15:18:13
Nop, j'utilise le Terminal ou iTerm depuis macos, à jour.

MacOS est victime du même bug. Essayez de mettre ça dans votre ~/.ssh/config

Host *
    IPQoS lowdelay throughput

Citation de: Vincent O le 04 Juin 2019 à 15:19:58
Citation de: Guillaume B le 04 Juin 2019 à 15:18:13
Nop, j'utilise le Terminal ou iTerm depuis macos, à jour.

MacOS est victime du même bug. Essayez de mettre ça dans votre ~/.ssh/config

Host *
    IPQoS lowdelay throughput


Bien vu !!!
Merci beaucoup, vous m'enlevez une grosse épine du clavier  :D

Bonne journée.