Saturday, March 30, 2024

Cygwin -- File permissions for ssh

Problem

While configuring openssh for cygwin, ssh key authentication does not work, the key does not get accepted 

Solution

Make sure the .ssh directory and the authorized_keys files have required permissions and ownership:

chown <your_username>:none ~/
chmod g-w ~/
chmod 700 ~/.ssh/
chmod 600 ~/.ssh/authorized_keys


No comments: