Sengoli sa Lingoloa
Ha e khone ho hokela Vultr VPS SSH?
Mokhoa oa ho theha senotlolo sa PuTTY
Hobane batho ba bangata ba marang-rang ba Machaena ba sebelisa Vultr VPS ho aha "mahlaleInternet", kahoo palo e kholo ea liaterese tsa IP tsa Vultr e ne e koetsoe ...
Fumana aterese ea IP
Pele ho tsohle, o tlameha ho netefatsa hore o thehile aterese ea IP ea Vultr. Na u ka e fumana naheng ea China joalo ka mehleng?
Tharollo:
- Sebelisa sesebelisoa sa ping sa inthaneteng ho fumana liaterese tsa IP ▼
Ke lokela ho etsa eng haeba aterese ea ka ea Vultr IP e koetsoe naheng ea China?
- Ka kopo, sheba sengoloa sena bakeng sa tharollo ▼
Ho kena ha senotlolo sa SSH
Ha VPS e ntse e pepesetsoa marang-rang, motho e mong o tla tsoelapele ho qobella password ea hau ea SSH ho kena.
Kahoo hoa hlokahala ho kena ka linotlolo tsa SSH, le ho tima ho kena ha password.
Sebelisa taelo e latelang ho sheba batho ba bang ba kenang ka matla bakeng sa password ea hau ea SSH:
grep "Failed password for invalid user" /var/log/secure | awk '{print $13}' | sort | uniq -c | sort -nr | more
Bakeng sa VPS ea rona e rekiloeng, qobella ka makhetlo a likete!U ka ea bona hore na u 'nile ua qobelloa ka sehlōhō hakae.
Tharollo:
- Fetola mokhoa oa ho kena oa senotlolo sa SSH ho mokhoa oa ho kena oa senotlolo sa SSH
Ho hlahisa senotlolo sa SSH
Haeba ke sistimi ea Windows, o hloka ho sebelisa puttygen 软件ho hlahisa para ea bohlokoa.
Linux le litsamaiso tsa MacOS li ka tsamaisoa ka kotloloho ho tsoa ho terminal:
mohato oa 1:Hlahisa linotlolo tsa SSH
Ka kopo, tsamaisa taelo ena ▼
ssh-keygen -t rsa -b 4096
mohato oa 2:Kenya sebaka sa faele ho boloka senotlolo
Enter file in which to save the key (/root/.ssh/id_rsa):
- Ka kopo, tobetsa Enter
mohato oa 3:U tla kopuoa ho kenya phasewete
Enter passphrase (empty for no passphrase): Enter same passphrase again:
- Kenya phasewete, kapa o ka tobetsa feela Enter ebe o e tlohela e se na letho.
Qetellong u tla bona molaetsa oa hore linotlolo tsa hau tsa lekunutu le tsa sechaba li bolokiloe moo:
Your identification has been saved in /root/.ssh/id_rsa. <== 私钥 Your public key has been saved in /root/.ssh/id_rsa.pub. <== 公钥
Vultr VPS Lokisa SSH
Ha Vultr e theha VPS, o ka theha SSH senotlolo sa ho kena.
Haeba u thehile VPS empa u so ka u theha linotlolo tsa SSH ...
Ka kopo latela mehato e ka tlase kamora ho sebelisa "SSH key generation" e kaholimo ho Linux:
Likhahlelo tsa 1:tla id_rsa.pub
放入 /root/.ssh
directory ebe u e reha lebitso hape ho authorized_keys
mohato oa 2:fetola /etc/ssh/sshd_config
faele ea tlhophiso
RSAAuthentication yes #RSA认证 PubkeyAuthentication yes #开启公钥验证 AuthorizedKeysFile .ssh/authorized_keys #验证文件路径 PasswordAuthentication no #禁止密码认证 PermitEmptyPasswords no #禁止空密码
mohato oa 3:Qala hape tšebeletso ea SSH
- Lilemo7 Sebelisa taelo ena:
systemctl restart sshd
- Centos6 sebelisa taelo:
/etc/init.d/sshd restart
PuTTY e hlahisa linotlolo
Haeba u sebelisa sistimi ea Windows ho kena VPS, u tla hloka ho khoasolla senotlolo sa lekunutu ho moreki ebe u se fetolela ho sebopeho se sebelisoang ke PuTTY.
- Ha u na software ea PuTTY e kentsoeng komporong ea hau?Ka kopo, batla ka Google kapa Baidu: Khoasolla PuTTY.
Likhahlelo tsa 1:U sebelisa WinSCP, SFTP kapa lisebelisoa tse ling, fetisetsa faele ea senotlolo sa lekunutu lebohang Khoasolla ho moreki.
Likhahlelo tsa 2:Bula PuTTYGen.exe
Likhahlelo tsa 3:Tobetsa konopo ea Mojaro ho Actions ▼
Likhahlelo tsa 4:Kenya faele ea lekunutu eo u sa tsoa e khoasolla
Ha u khone ho hlahisa faele ea senotlolo sa lekunutu?Ka kopo, khetha "Lifaele tsohle (*.*)" ▲
- Haeba u sa tsoa beha senotlolo sa senotlolo, u lokela ho kenya phasewete ka nako ena.
- Kamora mojaro o atlehileng, PuTTYGen e tla bonts'a tlhahisoleseling e amanang le senotlolo.
Likhahlelo tsa 5:Tobetsa konopo ea Boloka poraefete ho boloka mofuta oa faele oa senotlolo o fumanehang ho PuTTY ▼
Mokhoa oa ho theha Putty?
Se latelang ke ho beha Putty ho kena ka konopo ea PrivateLinuxMokhoa oa seva:
Likhahlelo tsa 1:Putty → Session: Tlatsa Lebitso la Moamoheli (Kapa Aterese ea IP)
Likhahlelo tsa 2:Putty → Khokahano → Letsatsi: Tlatsa lebitso la mosebelisi la ho kena: motso
Likhahlelo tsa 3:PPutty → Khokahano → SSH → Auth: Khetha faele ea senotlolo sa poraefete e sa tsoa hlahisoa ke PuTTYGen ho faele ea lekunutu ea lekunutu bakeng sa netefatso ▼
Likhahlelo tsa 4:Khutlela ho Putty → Session: Session e bolokiloeng, tlatsa lebitso ho boloka, ebe u tobetsa lebitso leo habeli ho kena ka kotloloho.
Likhahlelo tsa 5:O ka kena ho Linux ntle le phasewete nakong e tlang, ka kopo hopola ho boloka faele ea hau ea senotlolo sa lekunutu.
Ho fumana sesebelisoa sa lisebelisoa tsa Linux tse hole ho mehala ea cellular ea Android, ka kopo, tobetsa sehokelo sena ho sheba ▼
Palo e atolositsoeng:
Hope Chen Weiliang Blog ( https://www.chenweiliang.com/ ) o arolelane "Ha o khone ho hokela Vultr VPS SSH? PuTTY Key Generation Setting Method", e tla u thusa.
Rea u amohela ho arolelana sehokelo sa sengoloa sena:https://www.chenweiliang.com/cwl-646.html
Rea u amohela ho mocha oa Telegraph oa blog ea Chen Weiliang ho fumana lintlha tsa morao-rao!
📚 Tataiso ena e na le boleng bo boholo, 🌟Ona ke monyetla o sa tloaelehang, se ke oa o fetoa! ⏰⌛💨
Share le rata haeba u rata!
Ho arolelana le lintho tseo u li ratang ke khothatso ea rona e tsoelang pele!