Linux bash scripts failed again

@Ayman
I followed all the instructions as per the task details, copied required file from app server 2 to backup server without

Uploading: pic2.png… password authentication via script. plz check what went wrong

Hello, @pratikshag
You need to perform this task from respective sudo user of the server. For the app server 2 (steve). I think it’s mentioned in the question.

yes…I Performed all the task from app server 2.

i checked whether the file has been copied properly or not…

You have to perform task from sudo user (steve) not from root user.

In the first shared image, you copied root ssh keys not steve. I knew you are in the steve directory but system took ssh keys of root user. Because you are logged in from root user.

OK…GOT it…I should have not performed ssh-copy and ssh-keygen commands as a root user , instead i should have permormed it as a sudo user? will be carefull when the same task will be assigned next time…Thanks for your assistance.