我正在尝试让 ssh 工作cron
,似乎我已经尝试了所有标准技巧,但完全没有运气。我可以通过使用运行非交互式 ssh
>./some_script_with_ssh
Run Code Online (Sandbox Code Playgroud)
在 bash 中。只有当我尝试使用它时cron
它才会失败。我能得到的任何帮助将不胜感激。
以下是类似问题中要求的一些数据:
我的用户的 crontab
PATH = /home/zach/.ssh/:/usr/bin
52 * * * * ssh -vvv my_account@my_remote "touch temp.temp"
Run Code Online (Sandbox Code Playgroud)
从电子邮件 cron 发送给我的打印输出
OpenSSH_7.3p1 Ubuntu-1, OpenSSL 1.0.2g 1 Mar 2016
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: resolving "my_remote" port 22
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to my_remote [IP_HERE] port 22.
debug1: Connection established.
debug1: identity file /home/zach/.ssh/id_rsa type 1
debug1: key_load_public: No such …
Run Code Online (Sandbox Code Playgroud) 许多其他问题的答案有助于解决“无法从共享对象映射段”形式的错误,但它们通常有非常具体的答案,我发现这些答案很难应用于其他问题。另一方面,我一般找不到有关此错误的任何信息。
谁能给出这个错误的基本描述和(理想情况下)一些常见原因?
例如,很高兴知道哪个实体引发了错误(内核、进程、程序?)以及常见原因(例如,几乎每个库都被标记为可读,那么为什么我不能从中映射?) .
我目前正在运行 Ubuntu,尽管我怀疑这适用于许多发行版。