bước 1: install
install openssh bằng chocolatey theo cách bên dưới cho nhanh, hoặc có thể làm theo guide của microsoft
chocolatey
cài Chocolatey nếu chưa có, check hướng dẫn chi tiết ở đây
hoặc đơn giản
- Run
Get-ExecutionPolicy. If it returnsRestricted, then runSet-ExecutionPolicy AllSignedorSet-ExecutionPolicy Bypass -Scope Process. - run this command:
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
openssh
choco install openssh -y
bước 2: config
run install-sshd.ps1
sau khi cài đặt xong, thì mở folder C:\Program Files\OpenSSH-Win64 trong 1 cửa sổ PowerShell Administrator và chạy file install-sshd.ps1
enable service
mở Win-R / services.msc
Start 2 serices này lên, set Startup Type = Automatic luôn
- OpenSSH SSH Server
- OpenSSH Authentication Agent
test & enjoy
mở 1 cửa sổ PowerShell bất kì và chạy lệnh ssh localhost sau đó nhập username/password để xem đã vào OK hay chưa.
Top comments (0)