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 !
Création de nouvel utilisateur SSH sur serveur dédié RISE
Sujets apparentés
- Port 25 bloqué pour spam à répétition
10372
28.02.2018 13:39
- Spam et IP bloquée
8402
12.12.2016 11:53
- Rkhunter : parametre web_CMD invalide
8167
23.07.2017 15:43
- Mise à jour PHP sur Release 3 ovh
8083
11.03.2017 17:43
- Mise en place de VM avec IP publique sur Proxmox 6 [RESOLU]
8077
30.04.2020 17:12
- Connection smtp qui ne marche plus : connect error 10060
8011
12.04.2019 10:10
- Partition sur le disque de l'OS ESXI
7938
09.05.2017 14:33
- Envoi demail bloqué chez Gmail (550-5.7.26 DMARC)
7700
23.12.2019 08:40
- Meilleure solution pour disposer de plusieurs IP ?
7427
29.07.2018 09:40
- Comment me connecter par SSH en tant que root à mon serveur ?
6906
09.09.2019 14:34
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