I am connecting from bastion (server-name) to another server (ecash) through ssh via a key pair.
I have to copy a file called
htdocs from ecash to bastion, so I am running:
scp source_user@source_remote_host:/usr/bin/mysql_backup.sh \ target_user@target_remote_host:/var/tmp/
but that's asking me for a password, even though I was connected through a key pair.
And when I enter the password, I get permission denied error (publickey, keyboard-interactive).
Is there issue in the command or file permissions? What can I do?