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.

Speedy emails, satisfied customers

Postmark Image

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

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

👋 Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay