openssh-unix-dev October 2011 archive
Main Archive Page > Month Archives  > openssh-unix-dev archives
openssh-unix-dev: Re: scp with different users

Re: scp with different users

From: Peter Stuge <peter_at_nospam>
Date: Mon Oct 10 2011 - 23:03:21 GMT
To: openssh-unix-dev@mindrot.org

Alex Bligh wrote:
>> Does ssh a@b ssh d work?
>
> "ssh a@b" works
> "ssh d" works
> "ssh a@b ssh d" (as a single command) will not work,

Then scp from b to d will also not work.

> as b does not have the private key to get to d, only localhost
> does.

You can use ssh-agent to make direct communication from b to d work
while the key remains on localhost.

> I had presumed (perhaps wrongly), that scp was opening two
> sessions, one to b and one to d, and acting as a sort of
> intermediary.

Yes, wrongly.

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

Cool. It doesn't work because a@b can not authenticate for d. scp
does not first download data locally unless you explicitly tell it
to.

//Peter
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev