使用Win環境建立SSH,救救自己的金魚腦。:grinning: ##### Step.1 下載 OpenSSH-Win64.zip 最新版回來 ``` https://github.com/PowerShell/Win32-OpenSSH/releases ``` ##### Step.2 以系統管理人員身份執行 PowerShell / Cmd並將檔案複製到 C:\Program Files\OpenSSH 目錄下 ##### Step.3 執行安裝程序 ``` cd "$env:ProgramFiles\OpenSSH" powershell.exe -ExecutionPolicy Bypass -File install-sshd.ps1 ``` ##### Step.4 啟動 OpenSSH Server 服務 啟動 sshd 服務 ``` Start-Service sshd ``` 設定 sshd 服務自動啟動 ``` Set-Service -Name sshd -StartupType 'Automatic' ``` 設定新的 OpenSSH Server 防火牆規則 ``` New-NetFirewallRule -Name sshd -DisplayName 'OpenSSH Server (sshd)' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22 ``` ##### Step.5 安裝完成後,可以下指令確認有否成功 ``` 查看狀態:Get-Service sshd 關閉服務:Stop-Service sshd 重啟服務:Restart-Service sshd ``` ##### Step.6 最重要的"註冊公鑰" 將[SSH/SFTP/SCP 免密碼登入小筆記(上) - Clinet篇](https://hackmd.io/4ubJzs3ORMe3wLP504w23w)產出的公鑰加入至就打完收工嚕 公鑰放入C:\ProgramData\ssh 公鑰內容加入至此C:\ProgramData\ssh\administrators_authorized_keys  大Gauy先這樣 --- 觀看更多 :::info [SSH/SFTP/SCP 免密碼登入小筆記(上) - Clinet篇](https://hackmd.io/4ubJzs3ORMe3wLP504w23w) :::
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up