Notes on ssh in Cygwin ====================== Author: Momchil Ivanov Date : 2014.04.25 Date : 2014.10.24 Date : 2017.10.30 Introduction ------------ This article contains notes on using ssh in Cygwin. Could not create directory '/home/user/.ssh' -------------------------------------------- To fix this error edit /etc/passwd in Cygwin and change the HOME directory for the user. Setup sshd server ----------------- 1. Install the openssh package. 2. Start cygwin shell as Administrator and run # ssh-host-config 3. Make sure /etc/passwd and $HOME are properly set. 4. Run # net start sshd or # cygrunsrv -S sshd 5. Set up Windows Firewall to allow incomming connections to port 22. Configuration files of sshd are in /etc. To query the service use: # cygrunsrv --query sshd Use pageant ----------- One can use pageant with ssh in cygwin. For this download and install ssh-pageant [1]. Add # ssh-pageant eval $(/usr/bin/ssh-pageant -r -a "/tmp/.ssh-pageant-$USERNAME") to ~/.profile or ~/.bashrc. References ---------- 1: https://github.com/cuviper/ssh-pageant