从cron使用ssh的探针
我正在尝试自动执行通过ssh在远程机器上执行命令的脚本。 我有使用ssh-agent的机器之间的公钥authentication设置。 脚本从命令提示符执行时运行正常。 我怀疑我的问题是,由于它的极简主义环境,cron没有启动ssh-agent。 下面是我向ssh添加-v标志的输出: debug1: Authentications that can continue: publickey,gssapi-with-mic,password debug1: Next authentication method: gssapi-with-mic debug1: Authentications that can continue: publickey,gssapi-with-mic,password debug1: Authentications that can continue: publickey,gssapi-with-mic,password debug1: Next authentication method: publickey debug1: Offering public key: /home/<user>/.ssh/id_rsa debug1: Server accepts key: pkalg ssh-rsa blen 149 debug1: PEM_read_PrivateKey failed debug1: read PEM private key done: […]