Re: scp?

From: Richard E. Silverman (slade@shore.net)
Date: 12/26/02


From: slade@shore.net (Richard E. Silverman)
Date: 25 Dec 2002 20:21:38 -0500


>>>>> "DM" == Dimitri Maziuk <dima@127.0.0.1> writes:

    DM> Both kinds. With password auth, it asks for the password for 1st
    DM> connection and fails on the 2nd. With key-based auth it fails on
    DM> the second connection, even though it's the same key for both
    DM> systems.

To be expected; see below.

    DM> ...However, perhaps you need to turn on agent forwarding to
>> the second ssh invocation has access to your keys.

    DM> But only when copying between two remote machines?

Yes, of course. Say the host you are running the initial scp is A, and
you're doing scp B:foo C:bar. Your command has the effect of running a
second copy of ssh on B. It needs authentication information to login to
C; how will it get it? Password authentication will not work at all,
since scp on A invokes ssh with -n and provides no pty for the exec
channel, so ssh on B can't prompt you for it. Public-key will be OK, but
you have to use agent forwarding; again, even if an appropriate key in on
B, it can't prompt you for a passphrase.

    DM> Anyway, I tried it with non-protected key, no dice.

A plaintext key on A will be irrelevant, since it's ssh on B that needs
it.

-- 
  Richard Silverman
  slade@shore.net


Relevant Pages

  • Re: Is SSH worth it??
    ... > We would be using SSH and SCP. ... SCP for automated scripts. ... > client will not be prompted for a password. ... remote machine, but imho it is better to swap client+server and give ...
    (Security-Basics)
  • RE: SCP and MVS data sets?
    ... SCP and MVS data sets? ... Is it possible that the open function is different in SCP? ... You can also do the following weirdness to use ssh to copy a z/OS legacy ...
    (bit.listserv.ibm-main)
  • Re: linux to linux scp in batch mode: how?
    ... reason why it works now is because of the dsa key. ... > been configured automatically when I set up ssh, I would imagine that I am ... >> I have ssh and scp up and running on my two Redhat 7.2 Linux machines, ... >> between the machines. ...
    (comp.security.ssh)
  • Re: linux to linux scp in batch mode: how?
    ... And now I can log on via ssh or scp without being prompted for the password. ... I am not specifically using ssh-agent, ... > between the machines. ...
    (comp.security.ssh)
  • RES: Is SSH worth it??
    ... attacker would have root access to another machines in your network. ... When I needed automated scripting using ssh and scp I used this programming ... SCP for automated scripts. ...
    (Security-Basics)