Closed anhnongdan closed 7 years ago
It seems that it's only problem with Key and Permission. No more
=> added rsync -avzh -e 'ssh -i /root/.ssh/id_rsa.pub' but no luck
Result:
[root@VNPT-HNI-ANALYTIC-02 bimax_ha_migration]# tailf /tmp/rsync.log
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 for '/root/.ssh/id_rsa.pub' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
bad permissions: ignore key: /root/.ssh/id_rsa.pub
Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(605) [sender=3.0.9]
Tried ssh -i /id_rsa.pub but no success. key permission needs to be 600
[root@VNPT-HNI-ANALYTIC-02 bimax_ha_migration]# ll ../.ssh/
total 16
-rw-r--r-- 1 root root 2562 Jul 25 10:58 authorized_keys
-rw-------. 1 root root 3243 Feb 8 18:11 id_rsa
-rw-------. 1 root root 751 Feb 8 18:11 id_rsa.pub
-rw-r--r--. 1 root root 1099 Aug 4 12:04 known_hosts
It works with ssh -p 22 as above.
cef13c323b4fdd23f134a4bab26a010f7d430f4f
When run with sh manually, everything work fine. When run with cron, it seems that files can't be upload.