scp interacts directly with the terminal, and does not read from STDIN . You cannot pass the password over the channel, this is a security issue for scp, and it is the same for sftp, ssh.
you can try in this terminal (and this will not work):
echo "password" | scp me@localhost :test .
mouad source share