link above almost perfect with 1 caveat, which is ssh target host must exist in known host
look at this explanation
https://forum.ivorde.com/junos-system-configuration-archival-is-not-working-over-scp-t19351.html
I also found one bug in archival
BUG
let say I show here
# edit system archival configuration archive-sites
# show
"scp://ftp@10.0.10.107:22" password "$9$F5oA69p1RSyeW"; ## SECRET-DATA
"scp://ftp@10.0.10.107" password "$9$sYgoGHqf5z6"; ## SECRET-DATA
{master:0}[edit system archival configuration archive-sites]
then I want to delete the first one
root# delete "scp://ftp@10.0.10.107:22" password "$9$F5oA69p1RSyeW"
{master:0}[edit system archival configuration archive-sites]
it's not properly deleted
root# show
"scp://ftp@10.0.10.107:22";
"scp://ftp@10.0.10.107" password "$9$sYgoGHqf5z6"; ## SECRET-DATA
{master:0}[edit system archival configuration archive-sites]
I need to delete one more time
root# delete "scp://ftp@10.0.10.107:22"
{master:0}[edit system archival configuration archive-sites]
then it will be ok
root# show
"scp://ftp@10.0.10.107" password "$9$sYgoGHqf5z6"; ## SECRET-DATA