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

Réseau Discussion :

Problème open-ssh sur Debian


Sujet :

Réseau

  1. #1
    Membre habitué
    Homme Profil pro
    Webmaster
    Inscrit en
    Mai 2011
    Messages
    258
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 62
    Localisation : France

    Informations professionnelles :
    Activité : Webmaster
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Mai 2011
    Messages : 258
    Points : 151
    Points
    151
    Par défaut Problème open-ssh sur Debian
    Bonsoir ,
    Je fais tourner Debian sur un Raspberry Pi 3.
    Quand je me connecte à partir d'un poste du réseau privé, je tape la commande ssh pi@mon_ip/mdp et
    tout fonctionne bien.
    Je possède une adresse ip fixe sur mon routeur.
    Quand j'essaie de me connecter de la manière ssh pi@mon_ip_internet_fixe, alors apparait le message suivant :
    Permission denied, please try again.
    Est-ce un problème de configuration de sshd sur le serveur Debian ?

  2. #2
    Expert éminent sénior Avatar de disedorgue
    Homme Profil pro
    Ingénieur intégration
    Inscrit en
    Décembre 2012
    Messages
    4 280
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Ingénieur intégration
    Secteur : High Tech - Opérateur de télécommunications

    Informations forums :
    Inscription : Décembre 2012
    Messages : 4 280
    Points : 12 729
    Points
    12 729
    Par défaut
    Bonjour,

    Et ton routeur, il fait quoi au juste par rapport à ton raspberry ?

    Au peu d'informations que tu donnes, je pencherais plus sur un problème de configuration routeur.
    Cordialement.

  3. #3
    Membre habitué
    Homme Profil pro
    Webmaster
    Inscrit en
    Mai 2011
    Messages
    258
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 62
    Localisation : France

    Informations professionnelles :
    Activité : Webmaster
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Mai 2011
    Messages : 258
    Points : 151
    Points
    151
    Par défaut
    Merci pour l'aide.

    J'ai un routeur Zyxel, paramètre par OVH, mon provider.
    Du coté d'OVH, on m'a assuré que rien n'empêchait la connexion en ssh.
    Perso, j'en doute.
    Mais , peut-être, veut la config de sshd ?

  4. #4
    Membre éprouvé
    Homme Profil pro
    Ingénieur sécurité
    Inscrit en
    Avril 2014
    Messages
    498
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 39
    Localisation : France, Hauts de Seine (Île de France)

    Informations professionnelles :
    Activité : Ingénieur sécurité
    Secteur : Industrie

    Informations forums :
    Inscription : Avril 2014
    Messages : 498
    Points : 1 178
    Points
    1 178
    Par défaut
    En général les firewalls proprement configurés font du deny et non du reject donc ça finirait surement en timeout.

    Envoie ton sshd_config stp fais un tour du coté de /var/log/auth.log aussi.

  5. #5
    Membre habitué
    Homme Profil pro
    Webmaster
    Inscrit en
    Mai 2011
    Messages
    258
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 62
    Localisation : France

    Informations professionnelles :
    Activité : Webmaster
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Mai 2011
    Messages : 258
    Points : 151
    Points
    151
    Par défaut Problème connexion ssh sur machine distante ...
    Bonsoir ,
    Je résume :
    J'ai fait ssh-copy-id -i id_rsa.pub pi@réseau_privé sur la machine distante en réseau local.
    Avant, j'avais généré une clef publique sur l'hôte avec keygen.
    Quand, je me connecte sur mon réseau privé, tout marche nickel.
    La machine distante sur laquelle tourne open-ssh me demande la passphrase de la clé quand je suis connecté.
    Bon début, mais :
    Si je tente de faire ssh-copy-id -i id_rsa.pub pi@adresse_publique_ipV4_unique sur la machine distante alors j'ai :

    INFO: 1 -key(s) remain to be installed -- if you are prompted now it is to install the new keys.

    En clair , la clef publique refuse de s'installer .
    J'ai par la suite, une demande du mot de passe root de la machine distante.

    Voici le sshd_config de mon serveur sshd :

    IgnoreRhosts yes
    # For this to work you will also need host keys in /etc/ssh_known_hosts
    RhostsRSAAuthentication no
    # similar for protocol version 2
    HostbasedAuthentication no
    # Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication
    #IgnoreUserKnownHosts yes

    # To enable empty passwords, change to yes (NOT RECOMMENDED)
    PermitEmptyPasswords no

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

    # Change to no to disable tunnelled clear text passwords
    PasswordAuthentication no

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

    # GSSAPI options
    #GSSAPIAuthentication no
    #GSSAPICleanupCredentials yes

    X11Forwarding yes
    X11DisplayOffset 10
    PrintMotd no
    PrintLastLog yes
    TCPKeepAlive yes
    #UseLogin no

    #MaxStartups 10:30:60
    #Banner /etc/issue.net

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

    Subsystem sftp /usr/lib/openssh/sftp-server

    # 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

    Je ne sais pas où trouver de la documentation et suis bien sûr preneur pour toute aide.

  6. #6
    Membre éprouvé
    Homme Profil pro
    Ingénieur sécurité
    Inscrit en
    Avril 2014
    Messages
    498
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 39
    Localisation : France, Hauts de Seine (Île de France)

    Informations professionnelles :
    Activité : Ingénieur sécurité
    Secteur : Industrie

    Informations forums :
    Inscription : Avril 2014
    Messages : 498
    Points : 1 178
    Points
    1 178
    Par défaut
    Essaye cette commande :

    cat /var/log/auth.log | grep <ton_nom_d_utilisateur>

    Normalement, ou bien y a des choses qui sont renvoyés (et auquel cas met les ici stp) et les refus d'accès sont coté Debian, ou bien il n'y a rien et dans ce cas ton refus d'accès se situe plus en amont (donc coté routeur).

    On va partir du principe que tu n'as pas touché à PAM. Envoie quand même ton /etc/pam.d/sshd dans la foulée quand même si possible stp.

    Bizarre ton sshd_config ne stipule aucunement une authentification par clef publique.Fais moi plaisir et rajoute moi un "PermitRootLogin no" dans ton sshd_config ^^

    Ton routeur il passe comment de l'IP publique à l'IP privée? NAT je suppose? Si oui envoie la règle NAT que tu as mise en place.

  7. #7
    Membre éprouvé
    Homme Profil pro
    Ingénieur sécurité
    Inscrit en
    Avril 2014
    Messages
    498
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 39
    Localisation : France, Hauts de Seine (Île de France)

    Informations professionnelles :
    Activité : Ingénieur sécurité
    Secteur : Industrie

    Informations forums :
    Inscription : Avril 2014
    Messages : 498
    Points : 1 178
    Points
    1 178
    Par défaut
    Fais ça sur ton poste distant :

    telnet mon_ip_internet_fixe 22

    Ou change le port 22 par le port utilisé par ton routeur s'il fait du NAT.

    Si ça finit en timeout ----> ton problème vient du réseau (Firewall ou règle NAT vraisemblablement).

Discussions similaires

  1. Problème avec SSH sur Debian Wheezy
    Par jaymzwise dans le forum Administration système
    Réponses: 1
    Dernier message: 25/09/2014, 16h16
  2. Problème Tomcat 7 sur Debian Wheezy
    Par garthos dans le forum Tomcat et TomEE
    Réponses: 1
    Dernier message: 02/02/2014, 21h22
  3. [11gR2] problème d'installation sur debian 7
    Par linux user dans le forum Installation
    Réponses: 2
    Dernier message: 28/07/2013, 11h05
  4. Réponses: 3
    Dernier message: 24/04/2010, 12h59
  5. Problème install Mysql sur Debian
    Par robair dans le forum Débuter
    Réponses: 1
    Dernier message: 24/01/2007, 14h08

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