Git@framagit.org's password?

Est-ce que tu peux exécuter cette commande ? Peut-être que c’est un soucis de droits sur la clef privée

ls -larh /home/Thatoo/.ssh/id_rsa
$ ls -larh /home/Thatoo/.ssh/id_rsa
-rw------- 1 Thatoo Thatoo 1,8K mars  26 16:43 /home/Thatoo/.ssh/id_rsa

On m’a demandé aussi

$ ls -lrdt ~/.ssh
drwx------ 2 Thatoo Thatoo 4096 mars  26 16:50 /home/Thatoo/.ssh
Thatoo@defis-PORTEGE-Z30-A:~$ ls -larh /home/Thatoo/.ssh/id_rsa
-rw------- 1 Thatoo Thatoo 1,8K mars  26 16:43 /home/Thatoo/.ssh/id_rsa
Thatoo@defis-PORTEGE-Z30-A:~$ ssh -i ~/.ssh/id_rsa -Tv git@framagit.org
OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n  7 Dec 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to framagit.org [2a01:4f8:231:4c99::75] port 22.
debug1: Connection established.
debug1: identity file /home/Thatoo/.ssh/id_rsa type 0
debug1: key_load_public: No such file or directory
debug1: identity file /home/Thatoo/.ssh/id_rsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.3
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.9p1 Debian-10+deb10u2
debug1: match: OpenSSH_7.9p1 Debian-10+deb10u2 pat OpenSSH* compat 0x04000000
debug1: Authenticating to framagit.org:22 as 'git'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
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
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:nO6L2sApWj/OkjW7avditV/dHOMEG/cV7Ps5z7yaS30
debug1: Host 'framagit.org' is known and matches the ECDSA host key.
debug1: Found key in /home/Thatoo/.ssh/known_hosts:1
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering public key: RSA SHA256:XKm/NTOn9tfaxAJNxBVq91dJ4zqfd0AeEtuptNt499w /home/Thatoo/.ssh/id_rsa
debug1: Authentications that can continue: publickey,password
debug1: Offering public key: ED25519 SHA256:/1ZClArO5Q9P3i1TgzdeD5JaJ4BWPXAzsxMySW5EbgM MON_EMAIL_ADRESSE
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: password
git@framagit.org's password:

Je pense qu’il y a un soucis avec le fichier /home/Thatoo/.ssh/id_rsa-cert

debug1: key_load_public: No such file or directory
debug1: identity file /home/Thatoo/.ssh/id_rsa-cert type -1

J’ai testé depuis mon poste qui fonctionne bien et il n’y a pas ce soucis de key_load_public

je n’ai pas de fichier id_rsa-cert, je n’ai que id-rsa et id_rsa.pub

Idem, il n’y en a pas besoin.

/etc/ssh/ssh_config est

# This is the ssh client system-wide configuration file.  See
# ssh_config(5) for more information.  This file provides defaults for
# users, and the values can be changed in per-user configuration files
# or on the command line.

# Configuration data is parsed as follows:
#  1. command line options
#  2. user-specific file
#  3. system-wide file
# Any configuration value is only changed the first time it is set.
# Thus, host-specific definitions should be at the beginning of the
# configuration file, and defaults at the end.

# Site-wide defaults for some commonly used options.  For a comprehensive
# list of available options, their meanings and defaults, please see the
# ssh_config(5) man page.

Host *
#   ForwardAgent no
#   ForwardX11 no
#   ForwardX11Trusted yes
#   PasswordAuthentication yes
#   HostbasedAuthentication no
#   GSSAPIAuthentication no
#   GSSAPIDelegateCredentials no
#   GSSAPIKeyExchange no
#   GSSAPITrustDNS no
#   BatchMode no
#   CheckHostIP yes
#   AddressFamily any
#   ConnectTimeout 0
#   StrictHostKeyChecking ask
#   IdentityFile ~/.ssh/id_rsa
#   IdentityFile ~/.ssh/id_dsa
#   IdentityFile ~/.ssh/id_ecdsa
#   IdentityFile ~/.ssh/id_ed25519
#   Port 22
#   Protocol 2
#   Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc
#   MACs hmac-md5,hmac-sha1,umac-64@openssh.com
#   EscapeChar ~
#   Tunnel no
#   TunnelDevice any:any
#   PermitLocalCommand no
#   VisualHostKey no
#   ProxyCommand ssh -q -W %h:%p gateway.example.com
#   RekeyLimit 1G 1h
    SendEnv LANG LC_*
    HashKnownHosts yes
    GSSAPIAuthentication yes

/etc/ssh/sshd_config est

#	$OpenBSD: sshd_config,v 1.101 2017/03/14 07:19:07 djm Exp $

# This is the sshd server system-wide configuration file.  See
# sshd_config(5) for more information.

# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin

# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented.  Uncommented options override the
# default value.

#Port 22
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::

#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_ecdsa_key
#HostKey /etc/ssh/ssh_host_ed25519_key

# Ciphers and keying
#RekeyLimit default none

# Logging
#SyslogFacility AUTH
#LogLevel INFO

# Authentication:

#LoginGraceTime 2m
#PermitRootLogin prohibit-password
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10

#PubkeyAuthentication yes

# Expect .ssh/authorized_keys2 to be disregarded by default in future.
#AuthorizedKeysFile	.ssh/authorized_keys .ssh/authorized_keys2

#AuthorizedPrincipalsFile none

#AuthorizedKeysCommand none
#AuthorizedKeysCommandUser nobody

# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes

# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
#PermitEmptyPasswords no

# Change to yes to enable challenge-response passwords (beware issues with
# some PAM modules and threads)
ChallengeResponseAuthentication no

# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no

# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes
#GSSAPIStrictAcceptorCheck yes
#GSSAPIKeyExchange no

# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication.  Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
UsePAM yes

#AllowAgentForwarding yes
#AllowTcpForwarding yes
#GatewayPorts no
X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes
#PermitTTY yes
PrintMotd no
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS no
#PidFile /var/run/sshd.pid
#MaxStartups 10:30:100
#PermitTunnel no
#ChrootDirectory none
#VersionAddendum none

# no default banner path
#Banner none

# Allow client to pass locale environment variables
AcceptEnv LANG LC_*

# override default of no subsystems
Subsystem	sftp	/usr/lib/openssh/sftp-server

# Example of overriding settings on a per-user basis
#Match User anoncvs
#	X11Forwarding no
#	AllowTcpForwarding no
#	PermitTTY no
#	ForceCommand cvs server

On me demande d’ajouter DEUX v à ssh

ssh -i ~/.ssh/id_rsa -Tvvv git@framagit.org
OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n  7 Dec 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: resolving "framagit.org" port 22
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to framagit.org [2a01:4f8:231:4c99::75] port 22.
debug1: Connection established.
debug1: identity file /home/Thatoo/.ssh/id_rsa type 0
debug1: key_load_public: No such file or directory
debug1: identity file /home/Thatoo/.ssh/id_rsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.3
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.9p1 Debian-10+deb10u2
debug1: match: OpenSSH_7.9p1 Debian-10+deb10u2 pat OpenSSH* compat 0x04000000
debug2: fd 3 setting O_NONBLOCK
debug1: Authenticating to framagit.org:22 as 'git'
debug3: hostkeys_foreach: reading file "/home/Thatoo/.ssh/known_hosts"
debug3: record_hostkey: found key type ECDSA in file /home/Thatoo/.ssh/known_hosts:1
debug3: load_hostkeys: loaded 1 keys from framagit.org
debug3: order_hostkeyalgs: prefer hostkeyalgs: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
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-group-exchange-sha1,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,ext-info-c
debug2: host key algorithms: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa
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,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1
debug2: host key algorithms: rsa-sha2-512,rsa-sha2-256,ssh-rsa,ecdsa-sha2-nistp256,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
debug2: compression stoc: none,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: ecdsa-sha2-nistp256
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: ecdsa-sha2-nistp256 SHA256:nO6L2sApWj/OkjW7avditV/dHOMEG/cV7Ps5z7yaS30
debug3: hostkeys_foreach: reading file "/home/Thatoo/.ssh/known_hosts"
debug3: record_hostkey: found key type ECDSA in file /home/Thatoo/.ssh/known_hosts:1
debug3: load_hostkeys: loaded 1 keys from framagit.org
debug3: hostkeys_foreach: reading file "/home/Thatoo/.ssh/known_hosts"
debug3: record_hostkey: found key type ECDSA in file /home/Thatoo/.ssh/known_hosts:2
debug3: load_hostkeys: loaded 1 keys from 2a01:4f8:231:4c99::75
debug1: Host 'framagit.org' is known and matches the ECDSA host key.
debug1: Found key in /home/Thatoo/.ssh/known_hosts:1
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
debug2: key: /home/Thatoo/.ssh/id_rsa (0x55c3b0c6e590), explicit, agent
debug2: key: MON_EMAIL_ADRESSE (0x55c3b0c7dd50), agent
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,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521>
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,password
debug3: start over, passed a different list publickey,password
debug3: preferred gssapi-keyex,gssapi-with-mic,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: RSA SHA256:XKm/NTOn9tfaxAJNxBVq91dJ4zqfd0AeEtuptNt499w /home/Thatoo/.ssh/id_rsa
debug3: send_pubkey_test
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,password
debug1: Offering public key: ED25519 SHA256:/1ZClArO5Q9P3i1TgzdeD5JaJ4BWPXAzsxMySW5EbgM MON_EMAIL_ADRESSE
debug3: send_pubkey_test
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,password
debug2: we did not send a packet, disable method
debug3: authmethod_lookup password
debug3: remaining preferred: ,password
debug3: authmethod_is_enabled password
debug1: Next authentication method: password
git@framagit.org's password:

Hum oui, je sèche aussi. Je viens d’essayer et j’ai les mêmes résultats avec deux nouvelles clefs (RSA et ED25519). Impossible d’utiliser ces clefs. Peut-être un bug chez Frama ?

1 Like

As tu bien ajouté tes clés ssh dans les préférences de framagit ?
Moi,j’utilise ma clé publique RSA et ca marche trés bien.
Ca me fait penser a un problème de clé publique.
Essaye de regénérer un couple de clé.
Un tuto trouvé sur le net :https://www.hostinger.fr/tutoriels/generer-cle-ssh/
Puis va dans les prefs de framagit,clés ssh et tu ajoutes la clé publique

oui, j’ai même vérifié que le SHA256 donné par framagit soit le même qu’en local.

J’ai édit mon message précédent,regarde.

J’en ai édité au moins 4 ou 5 aujourd’hui pour essayé en suivant le tuto de frama et de gitlab.com mais j’avais toujours le même problème.

Second jour, un reboot, pas d’évolution.

J’ai l’impression que ce sont les « nouvelles clés » qui ne fonctionnent pas… Une mise à jour de gitlab côté frama ? @tcit @spf ?

Pas de souci de mon côté en

  • générant une nouvelle paire de clé publique privée ed25519
  • ajoutant la clé publique à Framagit
  • testant la connexion via ssh -i -T git@framagit.org

@tcit : En précisant le fichier de la clef privée après le -i (~/.ssh/id_ed25519 chez moi) j’ai une erreur « Too many authentication failure » (parce que je n’accepte pas l’option avec le mot de passe il me semble.

$>ssh -i ~/.ssh/id_ed25519 -T git@framagit.org
Received disconnect from 2a01:4f8:231:4c99::75 port 22:2: Too many authentication failures
Disconnected from 2a01:4f8:231:4c99::75 port 22
$>host framagit.org
framagit.org has address 176.9.183.75
framagit.org has IPv6 address 2a01:4f8:231:4c99::75
framagit.org mail is handled by 10 mail.framasoft.org.
$>ssh -i ~/.ssh/id_ed25519 -T git@176.9.183.75
Received disconnect from 176.9.183.75 port 22:2: Too many authentication failures
Disconnected from 176.9.183.75 port 22

Avec le mode verbeux on voit bien que la clef ~/.ssh/id_ed25519 renseignée est présentée par le client ssh. Dans les paramètres de gitlab et par vérification sur ma machine, les fingerprint sont les mêmes :

$>~/.ssh$ ssh-keygen -l -E md5 -f ~/.ssh/id_ed25519
256 MD5:51:ee:02:c9:f9:bb:68:5b:14:de:0a:3d:a6:54:9b:e3 sebbaz@sebbaz-w530 (ED25519)

image

De façon curieuse, le serveur de framagit ne met pas à jour la dernière date d’authentification au niveau de la clef.

@tcit est-ce que tu penses que

sudo apt remove --purge openssh-server openssh-client

(je ne sais pas pourquoi openss-server a été installé auparavant sur cette machine) puis

sudo apt install openssh-client

ça peut aider à résoudre mon problème?

Bon, alors pour information je tente un git clone d’un dépôt (à moi) public : ça ne fonctionne pas non plus.
Je suis sous Windows 10 (ordi du bureau), et le fait que mes identifiants (user.name et user.email) ne soient pas les bons ne devraient rien changer.

EDIT: ah, idem sur mon serveur web (sous debian donc). Je voulais installer un logiciel présent sur un dépôt public : il me demande un mot de passe. Ca fonctionne avec le https.