I wrote a script which downloads via scp and installs some packages. SSH keys are added to host and when I run [root@HostB ~]# ./myscripteverything is ok and packages are downloaded via scp without asking for password.I need to run this script via ssh but when I try[root@HostA ~]# ssh root@HostB ./myscriptI get Permission denied (publickey,password) error.When I'm trying to use ssh -t I get a password enquiry in place when scp command in myscript is executing. 
Permission denied when running script via ssh
ssh;permissions;scripting;key authentication