scp host1:file1 host2:file2 -> Permission denied??????

Ben Lindstrom mouring at etoh.eviladmin.org
Fri May 28 00:23:35 EST 2004



On Thu, 27 May 2004, Daniel Tourde wrote:

> Hello Ben,
>
>
> Thanks for your answer.
>
> > scp host1:file host2:file is like saying:
> >
> > ssh host1 "scp file host2:file"
>
> Yes. I know that, considering that I am already on host1, a simple "scp
> file1 host2:file2" could also do the trick, somehow.
>
>
> > As a result the method of authentication between host1 and host2 MUST NOT
> > require a tty.  You can use public key with ssh-agent, but you can't be
> > prompted for a password or any interactive authentication.
>
> This is were you are loosing me.
> Is there a fondamental difference between:
> scp host1:file1 host2:file
> and
> scp file1 host2:file ?
>
> If yes, what is it then and how a system is supposed to be configured to
> make it work whatever the user types.
>

scp does not try to figure out if "host1" or "host2" is the same as the
machine you are on.  To do so would be extremely tricky and could result
in wrong guessing.

therefor it always assume that you are transfer to two other machines.

-Ben




More information about the openssh-unix-dev mailing list