按照此处给出的说明进行 rsync 备份时:http : //troy.jdmz.net/rsync/index.html
我收到错误消息“协议版本不匹配——你的外壳干净吗?”
我在某处读到我需要使提示 (PS1="") 和 motd (.hushlogin) 显示静音才能解决这个问题。我这样做了,提示和登录横幅(MOTD)不再出现,但运行时仍然出现错误:
rsync -avvvz -e "ssh -i /home/thisuser/cron/thishost-rsync-key" remoteuser@remotehost:/remote/dir /this/dir/
Run Code Online (Sandbox Code Playgroud)
ssh 客户端和 sshd 服务器都使用协议的第 2 版。
可能是什么问题呢?
[编辑] 我发现http://www.eng.cam.ac.uk/help/jpmg/ssh/authorized_keys_howto.html 指示有时需要“通过使用 -2 标志强制 v2 到 ssh 或 slogin
ssh -2 -i ~/.ssh/my_private_key remotemachine"
Run Code Online (Sandbox Code Playgroud)
目前尚不清楚这是否解决了问题,因为我认为我在错误更改后进行了此更改,但事实是错误已演变为其他内容。当我了解更多信息时,我会更新这个。我当然会尝试在 emacs shell 中运行它的建议 -
我已将 Ubuntu 10.04LTS 桌面安装配置为仅允许公钥身份验证。
结果:公钥认证工作完美!
问题:问题是,尽管配置为仅接受公钥身份验证,客户端仍然接受密码身份验证 - 为什么?
当然可以使用我所看到的一些建议并遵循此处的建议:ssh:设置密钥后仍然可以使用密码
遵循这些建议后没有成功:
客户端的 /etc/ssh/ssh_config 读取:
# This is the ssh client system-wide configuration file. See
# ssh_config(5) for more information. This file provides defaults for
# users, and the values can be changed in per-user configuration files
# or on the command line.
# Configuration data is parsed as follows:
# 1. command line …Run Code Online (Sandbox Code Playgroud)