Hello,
I am an intermediate scripter. Mostly for tools as an admin. Recently I have written a script that uses secure copy to copy several files from one box to another. after each copy takes place a prompt appears for the scp password. There must be some way in my script I can input this once and hold as a variable that responds to the question each time.
example of my script:
while :
do
echo "type in julian date"
read x
scp /logs/access.$x getlogs@111.111.1.122:/logs/access.$x
done
When this script is run I then just type in the 3 digit code for the julian date i need. Usually I must do 10 files at a time and each time it prompts for the scp password.
Any thoughts?
And we thank you in advance for your support.
I am an intermediate scripter. Mostly for tools as an admin. Recently I have written a script that uses secure copy to copy several files from one box to another. after each copy takes place a prompt appears for the scp password. There must be some way in my script I can input this once and hold as a variable that responds to the question each time.
example of my script:
while :
do
echo "type in julian date"
read x
scp /logs/access.$x getlogs@111.111.1.122:/logs/access.$x
done
When this script is run I then just type in the 3 digit code for the julian date i need. Usually I must do 10 files at a time and each time it prompts for the scp password.
Any thoughts?
And we thank you in advance for your support.