Forum Discussion
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, 2018Nimbostratus
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.
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, 2018Nimbostratus
Hello,
Is it possible to scp (transfer) files from linux (F5) machine to the window server?
- Suresh_Jo_32729Aug 06, 2018Nimbostratus
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, 2018Noctilucent
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.sshpass
sshpass -p "password" scp "/var/local/ucs/${UCS_FILENAME}.ucs" abcd@1.2.3.4:/
Install tool
sudo apt-get install sshpass
Follow the link
- Suresh_Jo_32729Aug 07, 2018Nimbostratus
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) )