Création de nouvel utilisateur SSH sur serveur dédié RISE
... / Création de nouvel utilis...
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

Création de nouvel utilisateur SSH sur serveur dédié RISE

Par
b359255cd60ffde74b0a
Créé le 2023-05-26 13:36:31 (edited on 2024-09-04 11:14:56) dans Serveurs dédiés

Bonjour,

J'ai un serveur dédié RISE qui tourne sous Debian 10.
J'ai déjà accès à la machine avec un utilisateur et en root mais je souhaite ajouter un nouvel utilisateur à mon serveur pour m'y connecter en SSH. J'ai suivi ce guide: https://help.ovhcloud.com/csm/fr-public-cloud-compute-additional-ssh-keys?id=kb_article_view&sysparm_article=KB0050579.
Je sais que ce guide est pour le les machines de cloud public mais je pensais que la procédure pour créer un nouvel utilisateur linux pour se connecter en ssh serait la même.

Malheureusement cela ne fonctionne pas malgré le fait que l'user existe sur le serveur, que ma clé est bien dans le fichier authorized_keys. Mon user est bien dans la liste des AllowUsers du fichier sshd_config également. Voilà l'erreur quand j'essaye de me connecter avec mon nouvel utilisateur:

OpenSSH_9.2p1 Debian-2, OpenSSL 3.0.8 7 Feb 2023
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 54.37.80.78 [54.37.80.78] port 22.
debug1: Connection established.
debug1: identity file /home/olivier/.ssh/ovh type 0
debug1: identity file /home/olivier/.ssh/ovh-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_9.2p1 Debian-2
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.9p1 Debian-10+deb10u2
debug1: compat_banner: match: OpenSSH_7.9p1 Debian-10+deb10u2 pat OpenSSH* compat 0x04000000
debug1: Authenticating to 54.37.80.78:22 as 'olivier'
debug1: load_hostkeys: fopen /home/olivier/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256@libssh.org
debug1: kex: host key algorithm: rsa-sha2-512
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: SSH2_MSG_KEX_ECDH_REPLY received
debug1: Server host key: ssh-rsa SHA256:DAOCga3eX5FGskKQawolQL7qvLphmJS0QjQz6t4RADs
debug1: load_hostkeys: fopen /home/olivier/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug1: Host '54.37.80.78' is known and matches the RSA host key.
debug1: Found key in /home/olivier/.ssh/known_hosts:8
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: get_agent_identities: bound agent to hostkey
debug1: get_agent_identities: agent returned 4 keys
debug1: Will attempt key: /home/olivier/.ssh/ovh RSA SHA256:THgKCVvz8alvRpljMw2OUgP8N0DQcaxECZtUS3ckkWk explicit agent
debug1: Will attempt key: olivier@debian RSA SHA256:EYcG21/17nzuU1tKN8fUeiFI3RK/G8PX16beUgWvY3A agent
debug1: Will attempt key: olivier@debian RSA SHA256:mgIUoSwR95NkCHzHdVb5BmxX5U2LXxjCdjLGzK9UBpQ agent
debug1: Will attempt key: aws-eb RSA SHA256:rz3HD7JR4GjspSv950kbi2OUMX1ZmhoplMP/sR4O3Kw agent
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
debug1: Next authentication method: publickey
debug1: Offering public key: /home/olivier/.ssh/ovh RSA SHA256:THgKCVvz8alvRpljMw2OUgP8N0DQcaxECZtUS3ckkWk explicit agent
debug1: Authentications that can continue: publickey
debug1: Offering public key: olivier@debian RSA SHA256:EYcG21/17nzuU1tKN8fUeiFI3RK/G8PX16beUgWvY3A agent
debug1: Authentications that can continue: publickey
debug1: Offering public key: olivier@debian RSA SHA256:mgIUoSwR95NkCHzHdVb5BmxX5U2LXxjCdjLGzK9UBpQ agent
debug1: Authentications that can continue: publickey
debug1: Offering public key: aws-eb RSA SHA256:rz3HD7JR4GjspSv950kbi2OUMX1ZmhoplMP/sR4O3Kw agent
debug1: Authentications that can continue: publickey
debug1: No more authentication methods to try.
olivier@54.37.80.78: Permission denied (publickey)


Avez-vous une idée de ce qui cloche?
Merci d'avance !


1 réponse ( Latest reply on 2023-05-26 14:36:12 Par
janus57
)

Bonjour,

Aucune de vos clés de match.

Je dirais que vous vous êtes loupé dans la mise en place de la clé SSH.

Cordialement, janus57