I just installed ubuntu 20.04.1 LTS on windows 10 (2004) WSL 2 from windows store.
I want to switch from cygwin, so i copy cygwin ssh configuration from /mnt/d to ~ with
cp -R /mnt/d/dev/cygwin64/root/home/myuser/.ssh/ .
my usual ssh connection doesn't work and it seems to come from file/folder permission of ~/.ssh
a ls on this folder doesn't work
$ ls -al .ssh/
ls: cannot access '.ssh/id_rsa.pub': Permission denied
ls: cannot access '.ssh/id_rsa': Permission denied
ls: cannot access '.ssh/..': Permission denied
ls: cannot access '.ssh/.': Permission denied
ls: cannot access '.ssh/known_hosts': Permission denied
total 0
d????????? ? ? ? ? ? .
d????????? ? ? ? ? ? ..
-????????? ? ? ? ? ? id_rsa
-????????? ? ? ? ? ? id_rsa.pub
-????????? ? ? ? ? ? known_hosts
i tried
sudo chown myuser:myuser .ssh
sudo chown myuser:myuser .ssh/*
.ssh is still the same with ????????
here is a view of the home folder
$ ls -al
total 44
drwxr-xr-x 5 myuser myuser 4096 Aug 25 10:54 .
drwxr-xr-x 3 root root 4096 Aug 24 21:14 ..
-rw------- 1 myuser myuser 974 Aug 25 11:12 .bash_history
-rw-r--r-- 1 myuser myuser 220 Aug 24 21:14 .bash_logout
-rw-r--r-- 1 myuser myuser 5026 Aug 25 10:53 .bashrc
drwxr-xr-x 2 myuser myuser 4096 Aug 24 21:19 .docker
drwxr-xr-x 2 myuser myuser 4096 Aug 24 21:15 .landscape
-rw-r--r-- 1 myuser myuser 0 Aug 26 17:00 .motd_shown
-rw-r--r-- 1 myuser myuser 807 Aug 24 21:14 .profile
drw-r--r-- 2 myuser myuser 4096 Aug 25 10:54 .ssh
-rw-r--r-- 1 myuser myuser 0 Aug 24 21:16 .sudo_as_admin_successful
-rw------- 1 myuser myuser 792 Aug 25 10:53 .viminfo
I tried to add a wsl.conf file with automount without success
$ cat /etc/wsl.conf
[automount]
enabled = true
options = "metadata"