Forum Discussion
SCP automated backup failing.
Hi Guy's,
I am following the guide https://my.f5.com/manage/s/article/K13418 to create and automatically transfer my UCS file to our remote backup.
It creates the backup but I cannot transfer it via SFTP or SCP.
I get the following when I attempt to SCP to our Windows backup server:
[root@REDACTED] ucs # scp -p REDACTED test@REDACTED:E:\REDACTED password:
Connection to RE.DAC.TED.X closed by remote host.
lost connection
I just cant get this to work, I read that I haven't done the SSH key's part because I can use the password but it won't transfer the files.
Would really appreciate the help, I am not sure how I can find or open logs to see what the issue is.
My linux skills are weak.
(ed. REDACTED private details)
2 Replies
So by the looks of it you are unable to login with a username and password on your SCP server.
I think icall is a better way to perform backups.
Have a look at this article: https://devcentral.f5.com/s/articles/f5-backup-procedure-over-scp-using-icall-1200
Cheers,
Kees
you can try to use /bin/expect to execute scenario of interactive shell.
then put the expect execution in icall, crontab or other scheduler.# cat /var/tmp/script.exp set timeout -1 spawn $env(SHELL) match_max 100000 expect "#" send -- "scp /var/tmp/ggg.txt myusername@myserver.com:/target/path\n" expect "Password:" send -- "mypassword\n" expect "# " send -- "exit\n" # #/bin/expect -f /var/tmp/script.exp ...
you can create recording of other interactive shell flow file using "/bin/autoexpect -p"
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com