小编tap*_*jor的帖子

SCP 不能在 crontab 中工作,但可以在命令行中工作

经过大量研究,我找不到解决方案,但发布了这个问题。

我的电脑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/
Run Code Online (Sandbox Code Playgroud)

如果我在命令行中执行步骤 4,它工作正常。但是当我在 crontab 中做同样的事情时

22 10 * * * root scp -i ~/.ssh/id_rsa -r /var/www/abc abc@ip:/home/abc
Run Code Online (Sandbox Code Playgroud)

它什么也没做。

linux cron scp

5
推荐指数
1
解决办法
2万
查看次数

如何在JQuery警报中换行?

我试图在警报JQuery中进行换行?它应该像这样弹出

Good
Byee

alert("Good<br>Byee");
Run Code Online (Sandbox Code Playgroud)

有没有办法在JQuery中换行?

javascript jquery

1
推荐指数
1
解决办法
763
查看次数

标签 统计

cron ×1

javascript ×1

jquery ×1

linux ×1

scp ×1