Anyè Atik
Ou pa ka konekte ak Vultr VPS SSH?
Metòd konfigirasyon jenerasyon kle PuTTY
Paske anpil netizens Chinwa itilize Vultr VPS pou konstwi "SyansEntènèt" kanal, kidonk yon gwo kantite adrès IP Vultr yo te bloke...
Detekte adrès IP
Premye a tout, ou dwe konfime ke ou te kreye adrès IP Vultr. Èske ou ka jwenn aksè nan li nan tè pwensipal Lachin kòm dabitid?
Solisyon:
- Sèvi ak yon zouti ping sou entènèt pou detekte adrès IP ▼
Kisa mwen ta dwe fè si adrès IP Vultr mwen an bloke nan tè pwensipal Lachin?
- Tanpri gade atik sa a pou solisyon an ▼
SSH kle login
Pandan ke VPS la ekspoze a entènèt la, yon moun ap kontinye fòse modpas SSH ou a pou konekte.
Se konsa, li nesesè konekte ak kle SSH, epi fèmen login modpas.
Sèvi ak kòmandman sa a pou wè koneksyon fòs brital lòt moun pou modpas SSH ou:
grep "Failed password for invalid user" /var/log/secure | awk '{print $13}' | sort | uniq -c | sort -nr | more
Pou pwòp VPS nou achte, fòs brital jiska dè milye de fwa!Ou ka ale epi wè konbyen fwa ou te fòse brital tèt ou.
Solisyon:
- Chanje mòd login modpas SSH an mòd login SSH kle
SSH jenerasyon kle
Si se yon sistèm Windows, ou bezwen sèvi ak puttygen 软件jenere yon pè kle.
Linux ak sistèm MacOS yo ka kouri dirèkteman nan tèminal la:
etap 1:Jenere kle SSH
Tanpri kouri lòd sa a ▼
ssh-keygen -t rsa -b 4096
etap 2:Antre kote dosye a pou konsève pou kle a
Enter file in which to save the key (/root/.ssh/id_rsa):
- Tanpri peze Antre
etap 3:Yo pral mande w antre yon modpas
Enter passphrase (empty for no passphrase): Enter same passphrase again:
- Antre yon modpas, oswa ou ka senpleman peze Antre epi kite li vid.
Nan fen a ou pral wè yon mesaj ke kle prive ak piblik ou yo estoke la:
Your identification has been saved in /root/.ssh/id_rsa. <== 私钥 Your public key has been saved in /root/.ssh/id_rsa.pub. <== 公钥
Vultr VPS Konfigirasyon SSH
Lè Vultr kreye yon VPS, ou ka dirèkteman mete koneksyon kle SSH.
Si ou te kreye yon VPS men ou pa mete kanpe kle SSH...
Tanpri swiv etap ki anba yo apre w fin kouri "Jenerasyon kle SSH" ki anwo a sou Linux:
Etap 1:pral id_rsa.pub
mete nan yon /root/.ssh
anyè epi chanje non li authorized_keys
etap 2:modifye /etc/ssh/sshd_config
Fichye konfigirasyon
RSAAuthentication yes #RSA认证 PubkeyAuthentication yes #开启公钥验证 AuthorizedKeysFile .ssh/authorized_keys #验证文件路径 PasswordAuthentication no #禁止密码认证 PermitEmptyPasswords no #禁止空密码
etap 3:Rekòmanse sèvis SSH la
- santim7 Sèvi ak kòmandman an:
systemctl restart sshd
- Centos6 sèvi ak lòd:
/etc/init.d/sshd restart
PuTTY jenere kle
Si w ap itilize yon sistèm Windows pou konekte nan VPS la, w ap bezwen telechaje kle prive a nan kliyan an epi konvèti li nan fòma PuTTY itilize a.
- Pa gen lojisyèl PuTTY enstale sou òdinatè w lan?Tanpri rechèch Google oswa Baidu: Telechaje PuTTY.
Etap 1:Sèvi ak WinSCP, SFTP oswa lòt zouti, transfere dosye a kle prive id_rsa Telechaje sou kliyan an.
Etap 2:Louvri PuTTYGen.exe
Etap 3:Klike sou bouton Chaje nan Aksyon ▼
Etap 4:Chaje dosye kle prive ou sot telechaje a
Ou pa kapab montre dosye kle prive?Tanpri chwazi "Tout fichye (*.*)" ▲
- Si ou jis mete yon seri modpas, ou bezwen antre modpas la nan moman sa a.
- Apre yon chaj siksè, PuTTYGen pral montre enfòmasyon ki gen rapò ak kle a.
Etap 5:Klike sou bouton Sove kle prive a pou konsève fòma dosye kle prive ki disponib pou PuTTY ▼
Ki jan yo mete Putty?
Sa ki anba la a se mete Putty konekte ak kle priveLinuxMetòd sèvè:
Etap 1:Putty → Sesyon: Ranpli non lame a (oswa adrès IP)
Etap 2:Putty → Koneksyon → Dat: Ranpli non itilizatè ki konekte otomatikman: rasin
Etap 3:PPutty → Koneksyon → SSH → Otant: Chwazi dosye kle prive ki jis pwodwi pa PuTTYGen nan dosye kle prive pou otantifikasyon ▼
Etap 4:Retounen nan Putty → Sesyon: Sove Sesyon, ranpli non an pou sove, epi answit double-klike sou non an pou w konekte dirèkteman.
Etap 5:Ou ka konekte nan Linux san yon modpas alavni, tanpri sonje pou konsève pou dosye kle prive ou a.
Pou jwenn lojisyèl zouti Linux pou konekte a distans sou telefòn mobil Android yo, tanpri klike sou lyen sa a pou wè ▼
Lekti pwolonje:
Hope Chen Weiliang Blog ( https://www.chenweiliang.com/ ) pataje "Pa ka konekte ak Vultr VPS SSH? PuTTY Key Generation Setting Metòd", ap ede ou.
Byenvini pataje lyen atik sa a:https://www.chenweiliang.com/cwl-646.html
Byenveni nan chanèl Telegram blog Chen Weiliang a pou jwenn dènye mizajou yo!
📚 Gid sa a gen anpil valè, 🌟Sa a se yon opòtinite ki ra, pa rate li! ⏰⌛💨
Pataje epi like siw renmen!
Pataje w ak renmen ou se motivasyon kontinyèl nou!