• # j'ai tout recommencé du début!!

    Posté par . En réponse au message Sécurisation SSH poussée : authentification par clé DSA. Évalué à 1.

    j'ai supprimé les dossier .ssh de www-data coté client et .ssh de script coté serveur. en suite
    coté client

    ks*****:~$ ssh-keygen -t rsa
    Generating public/private rsa key pair.
    Enter file in which to save the key (/var/www/.ssh/id_rsa):

    (j'ai tapé entrer)

    Created directory '/var/www/.ssh'.
    Enter passphrase (empty for no passphrase):

    (j'ai tapé entrer pour ne pas avoir de passphrase a taper et accéder a mon serveur directement)

    Enter same passphrase again:

    idem

    Your identification has been saved in /var/www/.ssh/id_rsa.
    Your public key has been saved in /var/www/.ssh/id_rsa.pub.
    The key fingerprint is:
    **:**:**:**:**:**:**:**:**:**:**:**:**:**:**:** www-data@ip_du_serv
    The key's randomart image is:

    (là, il y a des symboles)

    ks****:~$ ssh-copy-id -i ~/.ssh/id_rsa.pub script@IP ̈_du_serv
    The authenticity of host 'IP ̈_du_serv (IP ̈_du_serv)' can't be established.
    RSA key fingerprint is **:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**.
    Are you sure you want to continue connecting (yes/no)? yes
    Warning: Permanently added '91.121.96.55' (RSA) to the list of known hosts.
    script@IP ̈_du_serv's password:
    Now try logging into the machine, with "ssh 'script@IP ̈_du_serv", and check in:

    .ssh/authorized_keys

    to make sure we haven't added extra keys that you weren't expecting.

    ks****:~$

    autorisation des fichiers:

    côté client:

    dossier .ssh: 700
    id_dsa: 600
    id_dsa.pub et known_hosts: 644

    côté serveur

    dossier .ssh: 700
    authorized_keys: 600

    coté serveur

    ns****:~# /etc/init.d/ssh restart
    Restarting OpenBSD Secure Shell server: sshd.


    ma clef privé et du type

    -----BEGIN RSA PRIVATE KEY-----
    MIIEoAIBAAKCAQEAotlD6nl4GfowH1LX+bLF9H8Ol/rGkWNH6Jxvfx9uow1Ak54F....
    -----END RSA PRIVATE KEY-----

    Ce que je ne comprend pas c'est qu'il y a des retours chariot

    pour les logs, ils sont activé mais je n'en ai aucun dans auth.log. j'en perd mon latin.
    et donc résultat toujours pareil:

    debug1: identity file /var/www/.ssh/identity type -1
    debug3: Not a RSA1 key file /var/www/.ssh/id_rsa.
    debug2: key_type_from_name: unknown key type '-----BEGIN'
    debug3: key_read: missing keytype