Ssh copy id to windows1/25/2024 ![]() Add the following line at the end: C:\Users\\.ssh\ /home//.ssh drvfs rw,noatime,uid=1000,gid=1000,case=off,umask=0077,fmask=0177 0 0 Open your Linux distro and edit the /etc/fstab file as root (e.g. And since Windows drives and folders can be mounted directly in WSL using DrvFs, we can combine them to automatically sync the. ssh directory directly and doesn't require changing /etc/wsl.conf to enable the metadata option (which can be a bit heavyweight, in my opinion).īy default, most/all Linux distros read and process the fstab file on startup, to automatically mount filesystems. ![]() You should now be able to fully share your Windows SSH config, hosts, and keys with your WSL distro, while maintaining them in a single place. ssh directory, and create a symlink back to your C: drive's. ssh directory and key files, as required by SSH: $ cd /mnt/c/Users/įinally, navigate to your distro's home drive, backup or remove any existing. Navigate to your mounted C: drive at /mnt/c/Users/, and set the proper permissions on the. These options ensure that files in the mounted system are given proper user and group ownership, and that they have sensible default permissions (as opposed to everything getting 777).Ĭlose the distro, wait about 10 seconds for the background subsystem to stop running, and reopen the distro. Open your distro, and create or modify the /etc/wsl.conf file to include the automount options below: $ cat /etc/wsl.conf To build on helpful answer, here's what worked for me.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |