问题描述
我是 cygwin 的新手。我在那里使用 ssh 时遇到问题。
当我尝试使用它时,出现以下错误:
$ ssh -i /home/Sebastian/.ssh/id_rsa user@domain
Warning: Identity file /home/Sebastian/.ssh/id_rsa not accessible: No such file or directory.
user@domain: Permission denied (publickey).
权限设置如下:
drwx------+ 1 Sebastian Kein 0 Dec 31 15:06 /home/Sebastian/.ssh
-rw------- 1 Sebastian Kein 1766 Oct 11 22:24 /home/Sebastian/.ssh/id_rsa
我将 /
挂载到 C:\programs\cygwin64
第 2 部分,我添加了一些更改:
我在 Windows 10 中删除了 id_rsa 的所有世界和组权限
以下工作现在:
> ssh -i .ssh/id_rsa user@domain
例如,任何其他访问 id_rsa 文件的方式都会失败(/home/Sebastian/.ssh/id_rsa 或 ~/.ssh/id_rsa)。 rsync 与 ssh 也不起作用
有人知道这里有什么问题吗?
解决方法
drwx------+
中的加号表明存在扩展的 ACL。
您可以尝试备份/etc/fstab,然后将行更改为:
none /cygdrive cygdrive binary,noacl,posix=0,user 0 0
并重新启动 Windows 并再次尝试 ssh。