Writing a shell script for copying file from one server to other by using third serve
echo "COPY FROM WHICH SERVER"
read s1 echo "COPY FROM WHICH USER" read u1 echo "COPY TO WHICH LOCATION" read s2 echo "COPY TO WHICH USER" read u2 echo "WHERE IS THE FILE AND WHICH FILE" read f1 scp $u1@$s1:$f1 $u2@$s2:/home/oracle Following is the error Permission denied, please try again. Permission denied, please try again. Permission denied (publickey,password). lost connection |
how about replaceing the scp with echo
and try manually! perhaps try copying from s1 to . and try copying a local file to s2 and see where it failes Edit: oh - and welcome to LQ :-P |
Shell script problem
Everything is working.
First i copy from s1 to current (.) and then from current to s2. It copies it when i do echo it is giving the right string. There may be a problem due to security or firewall Regards, Irfanb146 |
do you provide a password? do you have a dsa/rsa key?
if you have an dsa/rsa key, try using the -i parameter to the scp command |
shell Scripting
what is dsa/rsa key
|
All times are GMT -5. The time now is 04:49 PM. |