Linux Bash script task failed

Hi Team,

I have got the task to create a script to copy the blog file from folder to backer server. I have created it successfully and run it. I could even see the file copied to the server machine using scp command. However my task got failed saying “ is not found on backup server”. I had looked into the community group seems like lot of members faced the similar issue. Can you please look into it.

Below are the steps i have followed :

vi /scripts/
zip /backup/ -r /var/www/html/official
scp /backup/ clint@server:/backup/

chmod a+x
ssh-keygen -t rsa
ssh-copy-id -i $HOME/.ssh/ clint@
make sure ssh is working without password
run the script and verify in the backup folder & target machine.


Seems like you tested the whole script from user root on stapp03 and you setup the passwordless from root user itself

You must had tested it from server’s sudo user i.e banner for stapp03.