【发布时间】:2017-09-24 18:23:39
【问题描述】:
经过大量研究,我找不到解决方案,但发布了这个问题。
我有一台计算机 A 和 B 都是 Ubuntu 桌面。我想将文件从 A 复制到 B。我遵循的步骤。
1. ssh-keygen in computer A
2. Left password blank
3. Copied id_rsa.pub to computer B ~/.ssh/ from computer A
4. Renamed id_rsa.pub to authorized_keys in computer B
5. In computer A I did scp -i ~/.ssh/id_rsa -r /var/www/abc abc@ip:/home/abc/
如果我在命令行中执行第 4 步,它工作正常。但是当我在 crontab 中做同样的事情时
22 10 * * * root scp -i ~/.ssh/id_rsa -r /var/www/abc abc@ip:/home/abc
它什么都不做。
【问题讨论】: