Sengoli sa Lingoloa
Litlhaselo tse fetang 90% tsa VPS li bakoa ke ... Tlhaselo ea matla a brute-force ea SSH e fokolangHaeba o ntse o kena ho seva ka phasewete, ho kotsi jwalo ka ha o siya senotlolo sa ntlo ya hao se leketlile monyako.
Sehloohong sena, ke tla u tataisa mohato ka mohato ho phonyoha ka ho feletseng toro e mpe ea litlhaselo tsa password tse matla. Re tla kopanya... VPS Le putty软件Thupelo ena e sebelisa lisebelisoa tse sebetsang ka ho fetisisa tsa mola oa taelo ho u thusa ho phahamisa ts'ireletso ea hau ea SSH boemong bo holimo.
Hobaneng o sebedisa senotlolo ho ena le phasewete?
Ho sa tsotelehe hore na phasewete e rarahane hakae, e ntse e ka senngoa ke matla a maholo. Baqhekelli ba ka sebelisa lisebelisoa ho leka metsoako ea liphasewete tse mashome a likete ka motsotsoana.
le Senotlolo sa RSA sa 4096-bitKa khopolo-taba, ho ne ho tla nka dilemo tse dibilione ho petsoha. Ha ho bapiswa, phasewete e tshwana le lemati la pampiri, ha senotlolo e le heke ya tshepe.

Mohato oa 1: Hlahisa senotlolo sa SSH
Ho Linux Ntle le moo, ho macOS, o ka hlahisa para ea linotlolo tsa RSA tsa 4096-bit ka kotloloho:
ssh-keygen -t rsa -b 4096
Tobetsa Enter ho boloka tsela ea kamehla. /root/.ssh/id_rsa.
Kenya phasewete (ha ho hlokahale), kapa tobetsa feela Enter mme o e siee e se na letho.
Sistimi e tla hlahisa lifaele tse peli:
- Senotlolo sa poraefete:
id_rsa - Senotlolo sa sechaba:
id_rsa.pub
Ena ke "senotlolo" le "senotlolo" sa hao.
Mohato oa 2: Lokisa senotlolo sa sechaba ho seva
Beha senotlolo sa sechaba bukeng ea laesense ea VPS:
cp ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
Netefatsa bukana /root/.ssh/ e teng.
Ka tsela ena, seva e tla lemoha senotlolo sa hau sa phatlalatsa feela 'me e ke ke ea hlola e itšetleha ka phasewete.
Mohato oa 3: Fetola faele ea tlhophiso ea SSH
Fetola faele ea tlhophiso:
nano /etc/ssh/sshd_config
Fetola li-parameter tse latelang:
RSAAuthentication yes #RSA认证 PubkeyAuthentication yes #开启公钥验证 AuthorizedKeysFile .ssh/authorized_keys #验证文件路径 PasswordAuthentication no #禁止密码认证 PermitEmptyPasswords no #禁止空密码
Mohato ona o bohlokoa haholo: tima ho kena ka phasewete ka botlalo.
Mohato oa 4: Qala tšebeletso ea SSH hape
Etsa hore tlhophiso e sebetse hang-hang:
- CentOS7:
systemctl restart sshd
- Botho / Debian:
systemctl restart ssh
Tšebeletso e tiisitsoe hore e ntse e sebetsa:
systemctl status sshd
Mohato oa 5: Basebelisi ba Windows ba fetola senotlolo ba sebelisa PuTTYGen.
Haeba o sebelisa Windows, o hloka ho fetolela senotlolo sa poraefete ho sebopeho sa PuTTY:
- bulela PuTTYGen
- 点击 mojaro morwalo
id_rsa - 点击 Boloka senotlolo sa lekunutu Boloka e le
.ppk - Ho PuTTY → Khokahano → SSH → Tumello Khetha sena
.ppk文件
Ka tsela ena, o ka kena ka mokhoa o sireletsehileng ho VPS ea hau u sebelisa PuTTY.
Mohato oa 6: Netefatsa le ho itšireletsa khahlanong le litlhaselo tsa matla a mabifi
Netefatsa hore tlhophiso e sebetsa:
grep "Failed password" /var/log/auth.log
Li-log li tla bontša feela boiteko bo hlōlehileng ba mohlaseli, eseng ho kena ka katleho.
Tšireletso e eketsehileng:
- Sebelisanang Fail2Ban Thibela li-IP tse hlaselang ka bohona
- Fetola kou ea kamehla (mohlala, e fetole ho 2222).
- Firewall e lumella feela li-IP tse tšepahalang
Mekhoa ena e meraro e ka sitisa boiteko ba motho ea senyang marang-rang ka ho feletseng.
总结
Feta Hlahisa senotlolo → Lokisa senotlolo sa sechaba → Fetola sshd_config → Qala tšebeletso hape → PuTTY ho fetolela senotlolo Mehato ena, ea hau HestiaCP VPS e ka felisa ka botlalo kotsi ea litlhaselo tsa matla a ho sebelisa li-password brute.
Litlhaloso tsa "Phasewete e hlolehileng" tse ho li-log tseo ke boiteko bo se nang thuso ba bahlaseli 'me ha li bontše hore netefatso ea phasewete e ntse e butsoe.
Qetello: Tšireletso ke mohloli oa bophelo oa seva.
Lefatšeng la tshireletso ea tlhahisoleseling, li-password ke sehokelo se kotsing ka ho fetisisa. Ho nkela li-password sebaka ka linotlolo ha se khetho ea theknoloji feela, empa hape ke pontšo ea boikarabello le bohlale.
Jwalo ka ha ho boletswe ho "Pampiri e Tshweu ya Tshireletso ya Tlhahisoleseding": "Tshireletso ha se theko, empa ke boleng."
Kahoo nka khato. Lokolla VPS ea hau litlamong tsa li-password, 'me u lumelle litlhaselo tsa masholu a mabifi tsa bahlaseli hore li lule li le teng ka ho sa feleng libukeng tse hlōlehileng.
Hope Chen Weiliang Blog ( https://www.chenweiliang.com/ Sengoloa se reng "Mokhoa oa ho Rarolla Litlhaselo tsa SSH Brute-Force? Thuto e Sebetsang mabapi le ho Hlophisa Netefatso ea Senotlolo sa VPS ka HestiaCP," se arolelanoeng mona, se ka ba molemo ho uena.
Rea u amohela ho arolelana sehokelo sa sengoloa sena:https://www.chenweiliang.com/cwl-34161.html
