Update2:
use scp -A host-a:~/file host-b:~/
==
Update:
I find out the problems:
A: host-b is a clone of host-a, even the ssh keys are the same
B: by default, scp host-a:/file host-b:/
, copy will be direct from host-a to host-b without passing through workstation. Using scp -3 source:/file target:/
will force copy from source->workstation->target .
Before generating new keys, scp -3
works.
After generating new keys for host-b, the original scp
command also works.
===
Same result.
It did not ask for the passphrase of id_rsa .
It is asking for the password for host-b, but not host-a.
If copy a local file to host-b, then no password nor passphrase are being asked - scp ~/.file host-b:~/