Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

NodeBB

  1. Home
  2. Informatique
  3. Système d'exploitation : Ordinateur
  4. Linux
  5. Connexion à 2 facteurs en SSH

Connexion à 2 facteurs en SSH

Scheduled Pinned Locked Moved Linux
1 Posts 1 Posters 2.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • SoulalexS
    SoulalexS
    Soulalex
    wrote on last edited by
    #1

    <p style="text-align: center;"><strong><span style="font-size:24px;"><span style="font-family: lucida sans unicode,lucida grande,sans-serif;">Connexion à 2 facteurs en SSH</span></span></strong></p><p> </p><p><span style="font-family:lucida sans unicode,lucida grande,sans-serif;">Dans un soucis de sécurité permanent, l'authentification à 2 facteurs vient <strong>renforcer la sécurité de votre machine </strong>en ajoutant, en plus de votre mot de passe, un <strong>code sur 6 chiffres généré toutes les 30 secondes</strong>. Ainsi, un pirate ayant eu connaissance de votre mot de passe ne pourra se connecter que s'il connait le code de sécurité.</span></p><p> </p><p><span style="font-family:lucida sans unicode,lucida grande,sans-serif;"><span style="font-size:18px;"><strong>Installation et configuration sur la machine :</strong></span></span></p><p><span style="font-family:lucida sans unicode,lucida grande,sans-serif;"><hr/></span></p><p><span style="font-family:lucida sans unicode,lucida grande,sans-serif;">Tout d'abord installer le paquet</span><span style="font-family:courier new,courier,monospace;"> <strong>libpam-google-authenticator</strong></span><span style="font-family:lucida sans unicode,lucida grande,sans-serif;"> :</span></p><pre class="html ipsCode prettyprint" data-pbcklang="html" data-pbcktabsize="4">sudo apt-get install libpam-google-authenticator</pre><p> </p><p><span style="font-family:lucida sans unicode,lucida grande,sans-serif;">Ensuite vous devez <strong>générer une clé d'authentification</strong> qui servira pour l'application qui générera le code secret :</span></p><pre class="html ipsCode prettyprint" data-pbcklang="html" data-pbcktabsize="4">google-authenticator</pre><p> </p><p><span style="font-family:lucida sans unicode,lucida grande,sans-serif;"><strong>Suivez les instructions et sauvegardez dans un coin les clés de secours</strong> (car si vous n'avez plus accès à votre application, il vous sera alors impossible de vous connecter à votre serveur).</span></p><p> </p><p><span style="font-family:lucida sans unicode,lucida grande,sans-serif;">Ajoutez la ligne suivante au fichier <strong>/etc/pam.d/sshd</strong> :</span></p><pre class="html ipsCode prettyprint" data-pbcklang="html" data-pbcktabsize="4">auth required pam_google_authenticator.so</pre><p> </p><p><span style="font-family:lucida sans unicode,lucida grande,sans-serif;">Cherchez l'attribut suivant <strong>/etc/ssh/sshd_config </strong>dans le fichier et modifiez sa valeur comme ci-dessous :</span></p><pre class="html ipsCode prettyprint" data-pbcklang="html" data-pbcktabsize="4">ChallengeResponseAuthentication yes</pre><p> </p><p><span style="font-family:lucida sans unicode,lucida grande,sans-serif;">Redémarrez le service <strong>ssh </strong>:</span></p><pre class="html ipsCode prettyprint" data-pbcklang="html" data-pbcktabsize="4">sudo service ssh restart</pre><p> </p><p><span style="font-family:lucida sans unicode,lucida grande,sans-serif;">Votre machine est prête, il ne vous reste plus qu'à configurer votre application.</span></p><p> </p><p><span style="font-family:lucida sans unicode,lucida grande,sans-serif;"><span style="font-size:18px;"><strong>Sur votre application OTP :</strong></span></span></p><p><span style="font-family:lucida sans unicode,lucida grande,sans-serif;"><hr/></span></p><p><span style="font-family:lucida sans unicode,lucida grande,sans-serif;">Ajoutez une nouvelle clé avec la configuration qui suit :</span></p><ul><li><span style="font-family:lucida sans unicode,lucida grande,sans-serif;"><strong>Secret :</strong> la clé secrète générée avec le terminal</span></li><li><span style="font-family:lucida sans unicode,lucida grande,sans-serif;"><strong>Type :</strong> TOTP</span></li><li><span style="font-family:lucida sans unicode,lucida grande,sans-serif;"><strong>Digits :</strong> 6</span></li><li><span style="font-family:lucida sans unicode,lucida grande,sans-serif;"><strong>Algorithm : </strong>SHA512</span></li><li><span style="font-family:lucida sans unicode,lucida grande,sans-serif;"><strong>Interval : </strong>30</span></li></ul>

    Soulalex, Administrateur de Melinyel+ E-Mail : [email protected]+ GitHub : https://github.com/Soualex

    1 Reply Last reply
    0

    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

    With your input, this post could be even better 💗

    Register Login
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Login or register to search.
    Powered by NodeBB Contributors
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups