1.scp -r /Users/kim/Documents/sub/s.sh root@ip:/home/ 客戶端向服務(wù)器copy文件
2.bash s.sh 運(yùn)行sh
3.crontab 的使用
crontab [-u username] //省略用戶表表示操作當(dāng)前用戶的crontab
-e (編輯工作表)
-l (列出工作表里的命令)
-r (刪除工作作)
- myCommand
4.復(fù)制 ssh key 到遠(yuǎn)程服務(wù)器
ssh-copy-id root@remote_ip
5.刪除遠(yuǎn)程服務(wù)器key
ssh-keygen -f "~/.ssh/known_hosts" -R remote_ip