SSH 在 cygwin 上可用,但在 Linux 上不可用

SSH 在 cygwin 上可用,但在 Linux 上不可用

它们具有完全相同的 .ssh 文件和权限,并且它们通过 ssh 连接到相同的语言环境(实际上是 git fetch)

这是 Linux 系统:OpenSSH_5.3p1,OpenSSL 1.0.1e-fips 2013 年 2 月 11 日

debug3: sign_and_send_pubkey: RSA         2a:7d:aa:b0:bd:c7:7e:98:6c:71:1b:cf:7b:27:e4:c8:28:2d:7c:1c
debug2: we sent a publickey packet, wait for reply
debug3: Wrote 656 bytes for a total of 1965
debug1: Authentications that can continue: keyboard-interactive,publickey

..

这是 Cygwin:OpenSSH_7.1p2,OpenSSL 1.0.2h 2016 年 5 月 3 日

debug3: sign_and_send_pubkey: RSA MD5:b4:22:b7:ca:60:69:dc:f0:d8:42:18:ed:61:6c:08:70
debug2: we sent a publickey packet, wait for reply
debug1: Authentication succeeded (publickey).

..

答案1

我假设您有一台 CentOS/RHEL 机器(根据 OpenSSH 版本),并且在通向这些文件的某个地方有错误的 SELinux 标签。restorecon -FR ~/.ssh用户 shell 应该可以修复它们。如果没有,请提供 的列表 ls -lZd ~ ~./.ssh ~/.ssh/authorized_keys_file

/var/log/secure请注意,当您提高日志级别时,服务器日志()中应该可以看到一些错误。

相关内容