Cov txheej txheem:

Yuav ua li cas koj tsim ib tug pej xeem thiab ntiag tug key khub?
Yuav ua li cas koj tsim ib tug pej xeem thiab ntiag tug key khub?

Video: Yuav ua li cas koj tsim ib tug pej xeem thiab ntiag tug key khub?

Video: Yuav ua li cas koj tsim ib tug pej xeem thiab ntiag tug key khub?
Video: Tsis Muaj Peev Xwm Yuav Ua Li Cas 2024, Hlis ntuj nqeg
Anonim

Yuav Ua Li Cas Tsim Ib Tug Pej Xeem/Private Key Pair

  1. Pib lub tus yuam sij tiam program. myLocalHost% ssh-keygen Tsim pej xeem / tus kheej rsa ua khub tseem ceeb .
  2. Nkag mus rau hauv txoj kev mus rau cov ntaub ntawv uas yuav tuav lub tus yuam sij .
  3. Sau tus password rau kev siv koj li tus yuam sij .
  4. Rov sau tus password kom paub meej tias nws.
  5. Tshawb xyuas cov txiaj ntsig.
  6. Luam the pej xeem key thiab ntxiv cov tus yuam sij mus rau $HOME/.

Raws li txoj cai, kuv yuav ua li cas thiaj tsim tau tus yuam sij ntiag tug?

Txhawm rau tsim tus yuam sij SSH nrog PuTTYgen, ua raws cov kauj ruam no:

  1. Qhib qhov kev pab cuam PuTTYgen.
  2. Rau Hom key tsim, xaiv SSH-2 RSA.
  3. Nyem qhov Tsim khawm.
  4. Txav koj tus nas mus rau thaj tsam hauv qab ntawm qhov kev nce qib bar.
  5. Ntaus tus password hauv qhov Key passphrase teb.
  6. Nyem qhov Txuag private key khawm kom txuag tau tus yuam sij ntiag tug.

Ib sab saum toj no, kuv yuav ua li cas thiaj tsim tau ib khub niam txiv pej xeem / ntiag tug siv PuTTYgen? Txhawm rau rub tawm PuTTY lossis PuTTYgen, mus rau https://www.putty.org/ thiab nyem qhov Koj tuaj yeem rub tawm PuTTY ntawm no txuas.

  1. Khiav PuTTYgen program.
  2. Teem hom tus yuam sij los tsim kev xaiv rau SSH-2 RSA.
  3. Nyob rau hauv tus naj npawb ntawm cov khoom nyob rau hauv lub generated keybox, sau 2048.
  4. Nyem Tsim los tsim ib qho tseem ceeb ntawm pej xeem / ntiag tug.

Ntawm no, kuv yuav ua li cas los tsim ib tug pej xeem / ntiag tug khub tseem ceeb hauv Linux?

Tsim Private Key thiab Public Key (Linux)

  1. Qhib lub davhlau ya nyob twg (xws li xterm) ntawm koj lub khoos phis tawj siv.
  2. Nkag mus rau cov lus txib hauv qab no hauv lub davhlau ya nyob twg: ssh-keygen -t rsa.
  3. Nkag mus rau txoj kev ua tiav cov ntaub ntawv uas tus khub tseem ceeb tau txais kev cawmdim. Cov lus Nkag mus rau tus lej passphrase (kho qhov tsis muaj tus lej nkag): tau tshwm sim.
  4. Optional Sau tus password thiab rov ua dua.

PEM puas yog pej xeem lossis tus yuam sij ntiag tug?

A PEM cov ntaub ntawv yuav muaj tsuas yog hais txog txhua yam nrog rau a pej xeem key , a tus yuam sij ntiag tug , los yog ob qho tib si, vim a PEM cov ntaub ntawv tsis yog tus qauv. Hauv cov nyhuv PEM tsuas yog txhais tau tias cov ntaub ntawv muaj cov ntaub ntawv base64-encoded me ntsis.

Pom zoo: