scp with different users

Peter Stuge peter at
Tue Oct 11 09:50:21 EST 2011

Alex Bligh wrote:
>> Alex Bligh wrote:
>>> why
>>>  scp a at b:c d:
>>> fails, where
>>>  scp a at b:c .
>>>  scp c d:
>>> succeeds?
>> The former copies from c to d while the latter first copies from c to .
>> and then from . to d.
> The former copies file 'c' from user 'a' at host 'b' to the current
> user at host 'd'.

Sorry, where I wrote c I meant to write b.

> What I am asking is why the former can succeed but the latter fail

What you asked before was the opposite. Which is it? :)

Does ssh a at b ssh d work?

Is the username on d also a, or is the username on d the same as on
the local machine?


More information about the openssh-unix-dev mailing list