Hi,
I would like to transfer file defined in shell_command via SCP to the remote server.
I tested such scenario via SSH (where I used official SSH addon to connect to the HASS system) and it worked. But now I’m struggling with Home Assistant instance - it can’t recognize scp command.
This command works flawlessly:
shell_command:
download_curl: 'curl someHost/test.txt -o /config/files/test.txt'
By this I’m able to download required file. But now I want to transfer it via SCP to the remote server
shell_command:
transfer_sfile: 'scp -i /config/files/id_rsa /config/files/test.txt user@host:~/'
And I get such error message:
Error running command:
scp -i /config/files/id_rsa /config/files/test.txt user@host:~/
, return code: 1
I tried to do it even via crontab -e:
# do daily/weekly/monthly maintenance # min hour day month weekday command
/15 * * * * run-parts /etc/periodic/15min
0 * * * * run-parts /etc/periodic/hourly
0 2 * * * run-parts /etc/periodic/daily
0 3 * * 6 run-parts /etc/periodic/weekly
0 5 1 * * run-parts /etc/periodic/monthly
* * * * * /config/files/bash.sh*
But without any luck.
Do you have please any idea how to run SCP via Home Assistant running on HASS? Or any recommendation to addon supplying such scheduled functions to transfer file over SSH?
Thank you.