IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Windows Serveur Discussion :

SSH authentification par mot de passe, Permission denied, please try again


Sujet :

Windows Serveur

  1. #1
    Candidat au Club
    Homme Profil pro
    Apprenti Ingenieur
    Inscrit en
    Mai 2015
    Messages
    9
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 30
    Localisation : France, Pas de Calais (Nord Pas de Calais)

    Informations professionnelles :
    Activité : Apprenti Ingenieur

    Informations forums :
    Inscription : Mai 2015
    Messages : 9
    Points : 4
    Points
    4
    Par défaut SSH authentification par mot de passe, Permission denied, please try again
    Bonjour,
    J'utilise git et une connexion SSH pour push mes développements web sur un serveur de production, j'ai donc crée un repository sur mon serveur (Serveur windows 2012 R2) et installé git et OpenSSH sur le serveur.
    Tout fonctionnait très bien jusqu’à ce q'une mise à jour windows et le redémarrage du serveur vienne poser problème.
    Maintenant quand je tente une connexion ssh au serveur par le biais du prompt windows, mon mot de passe est demandé comme d'habitude puis immédiatement j'obtient "Permission denied, please try again".
    Sachant que je suis absolument sûr de mon mot de passe ainsi que de l'adresse du serveur.
    voici le fichier sshd_config du serveur : (c:/programData/ssh)

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

    # 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 __PROGRAMDATA__/ssh/ssh_host_rsa_key
    #HostKey __PROGRAMDATA__/ssh/ssh_host_dsa_key
    #HostKey __PROGRAMDATA__/ssh/ssh_host_ecdsa_key
    #HostKey __PROGRAMDATA__/ssh/ssh_host_ed25519_key

    # Ciphers and keying
    #RekeyLimit default none

    # Logging
    SyslogFacility AUTH
    LogLevel DEBUG

    # Authentication:

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

    PubkeyAuthentication yes
    RSAAuthentication yes

    # The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
    # but this is overridden so installations will only check .ssh/authorized_keys
    AuthorizedKeysFile C:\Users\mdaudruy\.ssh
    StrictModes yes

    #AuthorizedPrincipalsFile none

    # For this to work you will also need host keys in %programData%/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

    # GSSAPI options
    #GSSAPIAuthentication no

    #AllowAgentForwarding yes
    #AllowTcpForwarding yes
    #GatewayPorts no
    #PermitTTY yes
    #PrintMotd yes
    #PrintLastLog yes
    #TCPKeepAlive yes
    #UseLogin no
    #PermitUserEnvironment no
    #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

    # override default of no subsystems
    Subsystem sftp sftp-server.exe

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

    Match Group administrators
    AuthorizedKeysFile __PROGRAMDATA__/ssh/administrators_authorized_keys


    et le détail de la commande ssh -vvv <serveur>

    OpenSSH_for_Windows_8.0p1, LibreSSL 2.6.5
    debug3: Failed to open file:C:/Users/mdaudruy/.ssh/config error:2
    debug3: Failed to open file:C:/ProgramData/ssh/ssh_config error:2
    debug2: resolving "sntp5202" port 22
    debug2: ssh_connect_direct
    debug1: Connecting to sntp5202 [172.19.180.9] port 22.
    debug1: Connection established.
    debug1: identity file C:\\Users\\mdaudruy/.ssh/id_rsa type 0
    debug3: Failed to open file:C:/Users/mdaudruy/.ssh/id_rsa-cert error:2
    debug3: Failed to open file:C:/Users/mdaudruy/.ssh/id_rsa-cert.pub error:2
    debug1: identity file C:\\Users\\mdaudruy/.ssh/id_rsa-cert type -1
    debug3: Failed to open file:C:/Users/mdaudruy/.ssh/id_dsa error:2
    debug3: Failed to open file:C:/Users/mdaudruy/.ssh/id_dsa.pub error:2
    debug1: identity file C:\\Users\\mdaudruy/.ssh/id_dsa type -1
    debug3: Failed to open file:C:/Users/mdaudruy/.ssh/id_dsa-cert error:2
    debug3: Failed to open file:C:/Users/mdaudruy/.ssh/id_dsa-cert.pub error:2
    debug1: identity file C:\\Users\\mdaudruy/.ssh/id_dsa-cert type -1
    debug3: Failed to open file:C:/Users/mdaudruy/.ssh/id_ecdsa error:2
    debug3: Failed to open file:C:/Users/mdaudruy/.ssh/id_ecdsa.pub error:2
    debug1: identity file C:\\Users\\mdaudruy/.ssh/id_ecdsa type -1
    debug3: Failed to open file:C:/Users/mdaudruy/.ssh/id_ecdsa-cert error:2
    debug3: Failed to open file:C:/Users/mdaudruy/.ssh/id_ecdsa-cert.pub error:2
    debug1: identity file C:\\Users\\mdaudruy/.ssh/id_ecdsa-cert type -1
    debug3: Failed to open file:C:/Users/mdaudruy/.ssh/id_ed25519 error:2
    debug3: Failed to open file:C:/Users/mdaudruy/.ssh/id_ed25519.pub error:2
    debug1: identity file C:\\Users\\mdaudruy/.ssh/id_ed25519 type -1
    debug3: Failed to open file:C:/Users/mdaudruy/.ssh/id_ed25519-cert error:2
    debug3: Failed to open file:C:/Users/mdaudruy/.ssh/id_ed25519-cert.pub error:2
    debug1: identity file C:\\Users\\mdaudruy/.ssh/id_ed25519-cert type -1
    debug3: Failed to open file:C:/Users/mdaudruy/.ssh/id_xmss error:2
    debug3: Failed to open file:C:/Users/mdaudruy/.ssh/id_xmss.pub error:2
    debug1: identity file C:\\Users\\mdaudruy/.ssh/id_xmss type -1
    debug3: Failed to open file:C:/Users/mdaudruy/.ssh/id_xmss-cert error:2
    debug3: Failed to open file:C:/Users/mdaudruy/.ssh/id_xmss-cert.pub error:2
    debug1: identity file C:\\Users\\mdaudruy/.ssh/id_xmss-cert type -1
    debug1: Local version string SSH-2.0-OpenSSH_for_Windows_8.0
    debug1: Remote protocol version 2.0, remote software version WeOnlyDo 2.4.3
    debug1: no match: WeOnlyDo 2.4.3
    debug2: fd 3 setting O_NONBLOCK
    debug1: Authenticating to sntp5202:22 as 'eiffage\\mdaudruy'
    debug3: hostkeys_foreach: reading file "C:\\Users\\mdaudruy/.ssh/known_hosts"
    debug3: record_hostkey: found key type RSA in file C:\\Users\\mdaudruy/.ssh/known_hosts:1
    debug3: load_hostkeys: loaded 1 keys from sntp5202
    debug3: Failed to open file:C:/Users/mdaudruy/.ssh/known_hosts2 error:2
    debug3: Failed to open file:C:/ProgramData/ssh/ssh_known_hosts error:2
    debug3: Failed to open file:C:/ProgramData/ssh/ssh_known_hosts2 error:2
    debug3: order_hostkeyalgs: prefer hostkeyalgs: rsa-sha2-512-cert-v01@openssh.com,rs...01@openssh.com,ssh-
    sa-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-
    istp521,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,rs...01@openssh.com,ssh-rsa-cert-v01@opens
    h.com,rsa-sha2-512,rsa-sha2-256,ssh-rsa,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.c
    m,ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-ed25519-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecd
    a-sha2-nistp521,ssh-ed25519
    debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128...cm@openssh.com,aes256-gcm@
    penssh.com
    debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128...cm@openssh.com,aes256-gcm@
    penssh.com
    debug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm...tm@openssh.com,hmac-sha2-512-etm@ope
    ssh.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...tm@openssh.com,hmac-sha2-512-etm@ope
    ssh.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
    debug2: compression stoc: none
    debug2: languages ctos:
    debug2: languages stoc:
    debug2: first_kex_follows 0
    debug2: reserved 0
    debug2: peer server KEXINIT proposal
    debug2: KEX algorithms: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group1-sha1,diffie-hell
    an-group14-sha1
    debug2: host key algorithms: ssh-rsa,ssh-dss
    debug2: ciphers ctos: aes128-cbc,aes128-ctr,3des-cbc,blowfish-cbc,aes192-cbc,aes192-ctr,aes256-cbc,aes256-ctr,rijndael1
    8-cbc,rijndael192-cbc,rijndael256-cbc,rijndael-cbc@lysator.liu.se,cast128-cbc
    debug2: ciphers stoc: aes128-cbc,aes128-ctr,3des-cbc,blowfish-cbc,aes192-cbc,aes192-ctr,aes256-cbc,aes256-ctr,rijndael1
    8-cbc,rijndael192-cbc,rijndael256-cbc,rijndael-cbc@lysator.liu.se,cast128-cbc
    debug2: MACs ctos: hmac-sha2-256,hmac-sha2-512,hmac-sha1,hmac-sha1-96,hmac-md5,none
    debug2: MACs stoc: hmac-sha2-256,hmac-sha2-512,hmac-sha1,hmac-sha1-96,hmac-md5,none
    debug2: compression ctos: none,none
    debug2: compression stoc: none,none
    debug2: languages ctos:
    debug2: languages stoc:
    debug2: first_kex_follows 0
    debug2: reserved 0
    debug1: kex: algorithm: ecdh-sha2-nistp256
    debug1: kex: host key algorithm: ssh-rsa
    debug1: kex: server->client cipher: aes128-ctr MAC: hmac-sha2-256 compression: none
    debug1: kex: client->server cipher: aes128-ctr MAC: hmac-sha2-256 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:lpp3h3e5Tr6uUn/FVPU0nYwUTpRi/UnWwKaDl8C+Cjo
    debug3: hostkeys_foreach: reading file "C:\\Users\\mdaudruy/.ssh/known_hosts"
    debug3: record_hostkey: found key type RSA in file C:\\Users\\mdaudruy/.ssh/known_hosts:1
    debug3: load_hostkeys: loaded 1 keys from sntp5202
    debug3: Failed to open file:C:/Users/mdaudruy/.ssh/known_hosts2 error:2
    debug3: Failed to open file:C:/ProgramData/ssh/ssh_known_hosts error:2
    debug3: Failed to open file:C:/ProgramData/ssh/ssh_known_hosts2 error:2
    debug3: hostkeys_foreach: reading file "C:\\Users\\mdaudruy/.ssh/known_hosts"
    debug3: record_hostkey: found key type RSA in file C:\\Users\\mdaudruy/.ssh/known_hosts:1
    debug3: load_hostkeys: loaded 1 keys from 172.19.180.9
    debug3: Failed to open file:C:/Users/mdaudruy/.ssh/known_hosts2 error:2
    debug3: Failed to open file:C:/ProgramData/ssh/ssh_known_hosts error:2
    debug3: Failed to open file:C:/ProgramData/ssh/ssh_known_hosts2 error:2
    debug1: Host 'sntp5202' is known and matches the RSA host key.
    debug1: Found key in C:\\Users\\mdaudruy/.ssh/known_hosts:1
    debug3: send packet: type 21
    debug2: set_newkeys: mode 1
    debug1: rekey out after 4294967296 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 in after 4294967296 blocks
    debug3: unable to connect to pipe \\\\.\\pipe\\openssh-ssh-agent, error: 2
    debug1: pubkey_prepare: ssh_get_authentication_socket: No such file or directory
    debug1: Will attempt key: C:\\Users\\mdaudruy/.ssh/id_rsa RSA SHA256:90cOJeAtwGQNsCFobWXSyhdv+fSDWxg6B2jhocGRCnY
    debug1: Will attempt key: C:\\Users\\mdaudruy/.ssh/id_dsa
    debug1: Will attempt key: C:\\Users\\mdaudruy/.ssh/id_ecdsa
    debug1: Will attempt key: C:\\Users\\mdaudruy/.ssh/id_ed25519
    debug1: Will attempt key: C:\\Users\\mdaudruy/.ssh/id_xmss
    debug2: pubkey_prepare: done
    debug3: send packet: type 5
    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: password,gssapi-with-mic,publickey
    debug3: start over, passed a different list password,gssapi-with-mic,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: C:\\Users\\mdaudruy/.ssh/id_rsa RSA SHA256:90cOJeAtwGQNsCFobWXSyhdv+fSDWxg6B2jhocGRCnY
    debug3: send packet: type 50
    debug2: we sent a publickey packet, wait for reply
    debug3: receive packet: type 60
    debug1: Server accepts key: C:\\Users\\mdaudruy/.ssh/id_rsa RSA SHA256:90cOJeAtwGQNsCFobWXSyhdv+fSDWxg6B2jhocGRCnY
    debug3: sign_and_send_pubkey: RSA SHA256:90cOJeAtwGQNsCFobWXSyhdv+fSDWxg6B2jhocGRCnY
    debug3: sign_and_send_pubkey: signing using ssh-rsa
    debug3: send packet: type 50
    debug3: receive packet: type 51
    debug1: Authentications that can continue: password,gssapi-with-mic,publickey
    debug1: Trying private key: C:\\Users\\mdaudruy/.ssh/id_dsa
    debug3: no such identity: C:\\Users\\mdaudruy/.ssh/id_dsa: No such file or directory
    debug1: Trying private key: C:\\Users\\mdaudruy/.ssh/id_ecdsa
    debug3: no such identity: C:\\Users\\mdaudruy/.ssh/id_ecdsa: No such file or directory
    debug1: Trying private key: C:\\Users\\mdaudruy/.ssh/id_ed25519
    debug3: no such identity: C:\\Users\\mdaudruy/.ssh/id_ed25519: No such file or directory
    debug1: Trying private key: C:\\Users\\mdaudruy/.ssh/id_xmss
    debug3: no such identity: C:\\Users\\mdaudruy/.ssh/id_xmss: No such file or directory
    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
    debug3: failed to open file:C:/dev/tty error:3
    debug1: read_passphrase: can't open /dev/tty: No such file or directory
    eiffage\mdaudruy@sntp5202's password:
    debug3: send packet: type 50
    debug2: we sent a password packet, wait for reply
    debug3: receive packet: type 51
    debug1: Authentications that can continue: password,gssapi-with-mic,publickey
    Permission denied, please try again.
    debug3: failed to open file:C:/dev/tty error:3
    debug1: read_passphrase: can't open /dev/tty: No such file or directory

    j'ai vraiment fait le tour de la plus part des forums et je commence à désespérer,
    D'avance merci.

  2. #2
    Expert éminent
    Avatar de transgohan
    Homme Profil pro
    Développeur Temps réel Embarqué
    Inscrit en
    Janvier 2011
    Messages
    3 146
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Maine et Loire (Pays de la Loire)

    Informations professionnelles :
    Activité : Développeur Temps réel Embarqué

    Informations forums :
    Inscription : Janvier 2011
    Messages : 3 146
    Points : 9 386
    Points
    9 386
    Par défaut
    Cela semble être des problèmes de droits sur le répertoire utilisateur, ou bien des fichiers du répertoire utilisateur qui ont été supprimés.
    Vérifiez qu'il y a bien un dossier .ssh avec vos fichiers de clé dans votre répertoire utilisateur.

    « Toujours se souvenir que la majorité des ennuis viennent de l'espace occupé entre la chaise et l'écran de l'ordinateur. »
    « Le watchdog aboie, les tests passent »

  3. #3
    Candidat au Club
    Homme Profil pro
    Apprenti Ingenieur
    Inscrit en
    Mai 2015
    Messages
    9
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 30
    Localisation : France, Pas de Calais (Nord Pas de Calais)

    Informations professionnelles :
    Activité : Apprenti Ingenieur

    Informations forums :
    Inscription : Mai 2015
    Messages : 9
    Points : 4
    Points
    4
    Par défaut
    Bonjour et merci pour votre réponse,
    alors sur ma machine locale j'ai bien dans C:/Utilistaeurs/mdaudruy/ un dossier .ssh avec les droits "controle totale" pour moi et j'ai même ajouté "tout le monde" dans le doute.
    Et même chose pour le dossier C:/Utilisateurs/mdaudruy/.ssh sur le serveur.

  4. #4
    Expert éminent
    Avatar de transgohan
    Homme Profil pro
    Développeur Temps réel Embarqué
    Inscrit en
    Janvier 2011
    Messages
    3 146
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Maine et Loire (Pays de la Loire)

    Informations professionnelles :
    Activité : Développeur Temps réel Embarqué

    Informations forums :
    Inscription : Janvier 2011
    Messages : 3 146
    Points : 9 386
    Points
    9 386
    Par défaut
    Et vous avez bien un fichier config dans ce dossier ?

    « Toujours se souvenir que la majorité des ennuis viennent de l'espace occupé entre la chaise et l'écran de l'ordinateur. »
    « Le watchdog aboie, les tests passent »

  5. #5
    Candidat au Club
    Homme Profil pro
    Apprenti Ingenieur
    Inscrit en
    Mai 2015
    Messages
    9
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 30
    Localisation : France, Pas de Calais (Nord Pas de Calais)

    Informations professionnelles :
    Activité : Apprenti Ingenieur

    Informations forums :
    Inscription : Mai 2015
    Messages : 9
    Points : 4
    Points
    4
    Par défaut
    ah non sur mon poste j'ai trois fichiers :
    id_rsa
    id_rsa.pub
    known_hosts
    et coté serveur :
    known_hosts
    id_rsa
    id_rsa.pub
    authorized_keys

    j'ai un fichier sshd_config dans C:/programData/ssh par contre, celui que j'ai joint dans mon premier post.

  6. #6
    Expert éminent
    Avatar de transgohan
    Homme Profil pro
    Développeur Temps réel Embarqué
    Inscrit en
    Janvier 2011
    Messages
    3 146
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Maine et Loire (Pays de la Loire)

    Informations professionnelles :
    Activité : Développeur Temps réel Embarqué

    Informations forums :
    Inscription : Janvier 2011
    Messages : 3 146
    Points : 9 386
    Points
    9 386
    Par défaut
    Va peut être falloir faire une réinstallation alors.
    Car :
    debug3: Failed to open file:C:/Users/mdaudruy/.ssh/config error:2
    Il cherche bien un fichier nommé config.

    « Toujours se souvenir que la majorité des ennuis viennent de l'espace occupé entre la chaise et l'écran de l'ordinateur. »
    « Le watchdog aboie, les tests passent »

Discussions similaires

  1. Réponses: 3
    Dernier message: 20/06/2013, 21h26
  2. Réponses: 0
    Dernier message: 12/07/2012, 19h58
  3. [Core] FATAL : authentification par mot de passe échoue pour l'utilisateur x
    Par af.zakaria dans le forum Hibernate
    Réponses: 0
    Dernier message: 12/07/2012, 18h24
  4. Réponses: 2
    Dernier message: 21/09/2011, 08h29
  5. Authentification par mot de passe
    Par Jaafar_scorpion dans le forum Android
    Réponses: 0
    Dernier message: 11/03/2011, 00h08

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo