Forum Discussion
F5 Auto backup script for SCP for V12
Yes, Its possible. You can configure Public SSH Key to Remote Server.
So many document you will find in google.
https://www.howtogeek.com/168147/add-public-ssh-key-to-remote-server-in-a-single-command/
- Suresh_Jo_32729Aug 06, 2018
Nimbostratus
Thanks for sharing the docs, I tried to follow the steps mentioned in the above docs.
The remote server in which I want to transfers the files is windows server and my F5 is running on linux version(Linux version 2.6.32-431.56.1.el6.)
First I tried to shared the keys by command line. I got below error.
cat ~/.ssh/id_rsa.pub | ssh abcd@1.2.3.4 'cat >> .ssh/authorized_keys'abcd@1.2.3.4's password: exec request failed on channel 0 <<<<<<
Then I did scp to transfer the keys from F5 to window server.
.ssh scp /root/.ssh/id_rsa.pub abcd@1.2.3.4:/ abcd@1.2.3.4's password: id_rsa.pub 100% 420 0.4KB/s 00:00
It was successful but after that when I tried to run my script got same problem, password prompt.
admin bash bigipbackup.sh Saving active configuration... /var/local/ucs/date_xyz.ucs.ucs is saved. abcd@1.2.3.4's password: date_xyz.ucs.ucs 100% 6677KB 6.5MB/s 00:01
Any suggestion how password prompt can be avoid?
- Suresh_Jo_32729Aug 06, 2018
Nimbostratus
Hello,
Is it possible to scp (transfer) files from linux (F5) machine to the window server?
- Suresh_Jo_32729Aug 06, 2018
Nimbostratus
Hello,
Can someone pls confirm me if, Is it possible to scp (transfer) files from linux (F5) machine to the window server?
- Samir_Jha_52506Aug 06, 2018
Noctilucent
Can you try some thing like this...
scp "/var/local/ucs/${UCS_FILENAME}.ucs" abcd@1.2.3.4:/ echo "password"I am gusseting once unix system ask password, echo will pass that.
Other option is to use
tool in unix machine.sshpasssshpass -p "password" scp "/var/local/ucs/${UCS_FILENAME}.ucs" abcd@1.2.3.4:/Install tool
sudo apt-get install sshpassFollow the link
- Suresh_Jo_32729Aug 07, 2018
Nimbostratus
I tried this: scp "/var/local/ucs/${UCS_FILENAME}.ucs" abcd@1.2.3.4:/ echo "password"
It's not working, when I tried to run the script, I am still got password prompt and after that it printed my password in plain text.
I also tried to foll the step 2, but encountered with below error:
admin sudo apt-get install sshpass bash: sudo: command not found
admin apt-get install sshpass bash: apt-get: command not found
Device is running on below Linux version:
Linux version 2.6.32-431.56.1.el6. (gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC) )
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
