Accès SSH Mutualisé différent selon d'où l'on vient ?
... / Accès SSH Mutualisé diffé...
BMPCreated with Sketch.BMPZIPCreated with Sketch.ZIPXLSCreated with Sketch.XLSTXTCreated with Sketch.TXTPPTCreated with Sketch.PPTPNGCreated with Sketch.PNGPDFCreated with Sketch.PDFJPGCreated with Sketch.JPGGIFCreated with Sketch.GIFDOCCreated with Sketch.DOC Error Created with Sketch.
Question

Accès SSH Mutualisé différent selon d'où l'on vient ?

by
BertrandG13
Created on 2021-07-28 08:05:17 (edited on 2024-09-04 12:20:53) in Erreur connexion SSL

Bonjour,

J'essaie de me connecter en SSH à mon serveur mutualisé. J'ai créé un .ssh/config avec une clé qui fonctionne quand je l'utilise à partir de chez moi, mais qui ne fonctionne pas quand je l'utilise à partir d'un serveur hébergé chez O2Switch (il s'agit de backuper des infos hors site).

J'ajoute qu'à partir du même serveur O2Switch, je n'ai pas de problème pour me connecter à un VPS OVH avec la même procédure...:-)

A partir de chez moi :

bertrand@PC-Pro-Bertrand:~/tripleperformance$ ssh -v monserveur
OpenSSH_8.2p1 Ubuntu-4ubuntu0.2, OpenSSL 1.1.1f 31 Mar 2020
debug1: Reading configuration data /home/bertrand/.ssh/config
debug1: /home/bertrand/.ssh/config line 24: Applying options for monserveur
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug1: Connecting to ssh.cluster020.hosting.ovh.net [91.134.248.251] port 22.
debug1: Connection established.
debug1: identity file /home/bertrand/.ssh/ovh_ssh type 0
debug1: identity file /home/bertrand/.ssh/ovh_ssh-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.2
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.4p1
debug1: match: OpenSSH_7.4p1 pat OpenSSH_7.0*,OpenSSH_7.1*,OpenSSH_7.2*,OpenSSH_7.3*,OpenSSH_7.4*,OpenSSH_7.5*,OpenSSH_7.6*,OpenSSH_7.7* compat 0x04000002
debug1: Authenticating to ssh.cluster020.hosting.ovh.net:22 as 'mon-compte'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ssh-ed25519
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ssh-ed25519 SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxxxx
debug1: Host 'ssh.cluster020.hosting.ovh.net' is known and matches the ED25519 host key.
debug1: Found key in /home/bertrand/.ssh/known_hosts:11
debug1: rekey out after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after 134217728 blocks
debug1: Will attempt key: /home/bertrand/.ssh/ovh_ssh RSA SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxxxx explicit
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering public key: /home/bertrand/.ssh/ovh_ssh RSA SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxxxx explicit
debug1: Server accepts key: /home/bertrand/.ssh/ovh_ssh RSA SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxxxx explicit
debug1: Authentication succeeded (publickey).
Authenticated to ssh.cluster020.hosting.ovh.net ([91.134.248.251]:22).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: pledge: network
debug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0
debug1: Sending environment.
debug1: Sending env LANG = C.UTF-8
Welcome to OVH
mon-compte@ssh01.cluster020.gra.hosting.ovh.net (php/7.3/production/stable) ~ $

A partir d'un serveur chez O2Switch :

[wkgv-xxxx@gaz ~]$ ssh -v monserveur
OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017
debug1: Reading configuration data /home/wkgv-xxxx/.ssh/config
debug1: /home/wkgv-xxxx/.ssh/config line 8: Applying options for monserveur
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 58: Applying options for *
debug1: Connecting to ssh.cluster020.hosting.ovh.net [91.134.248.251] port 22.
debug1: connect to address 91.134.248.251 port 22: Connection refused
ssh: connect to host ssh.cluster020.hosting.ovh.net port 22: Connection refused

Y a-t-il des restrictions sur l'accès SSH en mutualisé en fonction de là d'où on vient ?

Merci de votre aide !