DEV Community

Long Nguyễn Xuân
Long Nguyễn Xuân

Posted on

setup ssh server trên windows

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

  1. Run Get-ExecutionPolicy. If it returns Restricted, then run Set-ExecutionPolicy AllSigned or Set-ExecutionPolicy Bypass -Scope Process.
  2. 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 
Enter fullscreen mode Exit fullscreen mode

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.

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more