一、安裝SSH ssh
默認的Cygwin沒有安裝ssh測試
因此從新運行http://www.cygwin.com/setup-x86_64.exe spa
在Select Packages的時候,在search輸入sshserver
選擇openssh:The OpenSSH server and client programs get
二、配置SSH服務(以管理員身份運行cygwin) io
執行:ssh-host-config cli
Should privilege separation be used? yes sed
Do you want to install sshd as a service? yes 配置
默認確認 service
Do you want to use a different name? no
Create new privileged user account 'cyg_server'? yes
輸入密碼
啓動SSH服務:cygrunsrv -S sshd
三、生成SSH Key
ssh-keygen -t rsa(密碼爲空,路徑默認)
cp .ssh/id_rsa.pub .ssh/authorized_keys
四、登錄測試
ssh localhost