cygwinでsshd設定

- 必要なパッケージも含めてcygwinをインストール
- cygwinを管理者として実行
- ssh-host-config
- cygrunsrv -S sshd

Privilege separationを使った。
Enter the value of CYGWIN for the daemonのところは、ntsecとすれば問題なさそうだ。

その後、22番ポートを開放する。これは、コントロールパネル→システムとセキュリティ→Windowsファイアウォールで受信側の新しい規則を作成する。

sshdの再インストールは少々面倒だ。

cygrunsrv --stop sshd
cygrunsrv --remove sshd

(Delete any sshd or related users (such as cyg_server) from /etc/passwd)
(Delete any sshd or relaged users (such as cyg_server) from the system)
net user sshd /delete
net user cyg_server /delete