What does scp2 a ... b mean? - SSH

This is a discussion on What does scp2 a ... b mean? - SSH ; In this line: scp2 [-D debug_level_spec] [-d ] [-p ] [-n ] [-u ] [-v ] [-h ] [-c cipher ] [-S ssh2-path] [-P ssh2-port] [-t ] [-f ] [-1 ] [-r ] [[user@]host[#port]:]file ... [[user@]host[#port]:]file_or_dir ^^^ of this manpage ...

+ Reply to Thread
Results 1 to 9 of 9

Thread: What does scp2 a ... b mean?

  1. What does scp2 a ... b mean?

    In this line:

    scp2 [-D debug_level_spec] [-d ] [-p ] [-n ] [-u ] [-v ] [-h ]
    [-c cipher ] [-S ssh2-path] [-P ssh2-port] [-t ] [-f ] [-1 ]
    [-r ] [[user@]host[#port]:]file ... [[user@]host[#port]:]file_or_dir
    ^^^
    of this manpage of scp2:
    http://www.employees.org/~satch/ssh/.../scp2_man.html

    what exactly does "..." mean?

    I was hoping I could copy multiple source files (not in a small enough
    common hierarchy that -r could fetch) from one host to one destination
    within one ssh session with only one authentication.

    Or should I use sftp for that?

    --
    René Pijlman

  2. Re: What does scp2 a ... b mean?

    >
    > In this line:
    > scp2 [-D debug_level_spec] [-d ] [-p ] [-n ] [-u ] [-v ] [-h ]
    > [-c cipher ] [-S ssh2-path] [-P ssh2-port] [-t ] [-f ] [-1 ]
    > [-r ] [[user@]host[#port]:]file ... [[user@]host[#port]:]file_or_dir
    > ^^^
    > of this manpage of scp2:
    > http://www.employees.org/~satch/ssh/.../scp2_man.html
    >
    > what exactly does "..." mean?
    >
    > I was hoping I could copy multiple source files (not in a small enough
    > common hierarchy that -r could fetch) from one host to one destination
    > within one ssh session with only one authentication.


    That's exactly what it means.

    --
    Richard Silverman
    res@qoxp.net


  3. Re: What does scp2 a ... b mean?

    "Richard E. Silverman" writes:

    >>
    >> In this line:
    >> scp2 [-D debug_level_spec] [-d ] [-p ] [-n ] [-u ] [-v ] [-h ]
    >> [-c cipher ] [-S ssh2-path] [-P ssh2-port] [-t ] [-f ] [-1 ]
    >> [-r ] [[user@]host[#port]:]file ... [[user@]host[#port]:]file_or_dir
    >> ^^^
    >> of this manpage of scp2:
    >> http://www.employees.org/~satch/ssh/.../scp2_man.html
    >>
    >> what exactly does "..." mean?
    >>
    >> I was hoping I could copy multiple source files (not in a small enough
    >> common hierarchy that -r could fetch) from one host to one destination
    >> within one ssh session with only one authentication.


    >That's exactly what it means.


    However if you multiple source files you must have a directory as the
    destination. Ie, you cannot rename the files on the host machine at the
    same time as copying them.


    >--
    > Richard Silverman
    > res@qoxp.net



  4. Re: What does scp2 a ... b mean?

    Unruh:
    >Richard E. Silverman:
    >>> I was hoping I could copy multiple source files (not in a small enough
    >>> common hierarchy that -r could fetch) from one host to one destination
    >>> within one ssh session with only one authentication.

    >
    >>That's exactly what it means.


    I'm afraid not. My scp wants to login and connect to the same server for
    every separate file on the command line:

    rene@anand:~/work$ scp -q karpov:/etc/services karpov:/etc/services .
    Password:
    Password:

    I was hoping there was a way to tell scp to use one session for multiple
    files on the same remote host.

    Yes, I know about ssh-agent. But my problem is that I need to copy files
    from a machine, not under my control, that rejects (or rather: drops)
    multiple connects in a short timeframe (it's a defense using iptables
    against a flooding or dos attack). This sometimes hangs my scripts.

    >However if you multiple source files you must have a directory as the
    >destination. Ie, you cannot rename the files on the host machine at the
    >same time as copying them.


    Okay, that's fine.

    --
    René Pijlman

  5. Re: What does scp2 a ... b mean?

    Rene Pijlman wrote:
    > Unruh:
    >> Richard E. Silverman:
    >>>> I was hoping I could copy multiple source files (not in a small
    >>>> enough common hierarchy that -r could fetch) from one host to one
    >>>> destination within one ssh session with only one authentication.

    >>
    >>> That's exactly what it means.

    >
    > I'm afraid not. My scp wants to login and connect to the same server
    > for every separate file on the command line:
    >
    > rene@anand:~/work$ scp -q karpov:/etc/services karpov:/etc/services .
    > Password:
    > Password:
    >
    > I was hoping there was a way to tell scp to use one session for
    > multiple files on the same remote host.
    >
    > Yes, I know about ssh-agent. But my problem is that I need to copy
    > files from a machine, not under my control, that rejects (or rather:
    > drops) multiple connects in a short timeframe (it's a defense using
    > iptables against a flooding or dos attack). This sometimes hangs my
    > scripts.
    >
    >> However if you multiple source files you must have a directory as the
    >> destination. Ie, you cannot rename the files on the host machine at
    >> the same time as copying them.

    >
    > Okay, that's fine.


    Or you can use "rsync -e ssh" to get a list of specific targets and mirror
    them locally.



  6. Re: What does scp2 a ... b mean?

    >
    > Unruh:
    > >Richard E. Silverman:
    > >>> I was hoping I could copy multiple source files (not in a small enough
    > >>> common hierarchy that -r could fetch) from one host to one destination
    > >>> within one ssh session with only one authentication.

    > >
    > >>That's exactly what it means.

    >
    > I'm afraid not. My scp wants to login and connect to the same server for
    > every separate file on the command line:
    >
    > rene@anand:~/work$ scp -q karpov:/etc/services karpov:/etc/services .
    > Password:
    > Password:


    Ah. I was referring to a single scp session. You want there to be a
    single SSH connection. That will not happen with scp; see:

    http://groups.google.com/group/comp....ec5be1567737?q

    --
    Richard Silverman
    res@qoxp.net


  7. Re: What does scp2 a ... b mean?

    "Richard E. Silverman" (06-03-12 00:16:28):

    > Ah. I was referring to a single scp session. You want there to be a
    > single SSH connection. That will not happen with scp; ...


    There is a workaround:

    % tar -jc FILES | ssh USER@HOST tar -C DESTDIR -jx

    It's also easier on bandwidth (if you don't use compression via SSH) and
    doesn't use SCP at all. Finally it's even more secure, because it
    destroys redundancy information and makes harder to guess, what you're
    doing.


    Regards.

  8. Re: What does scp2 a ... b mean?

    Ertugrul Soeylemez:
    >There is a workaround:
    >
    > % tar -jc FILES | ssh USER@HOST tar -C DESTDIR -jx


    Ah yes, why didn't I think of that. It does require the ability to run
    commands on the source host though. But I can use it in my case.

    --
    René Pijlman

    Wat wil jij leren? http://www.leren.nl

  9. Re: What does scp2 a ... b mean?

    Nico Kadel-Garcia:
    >Or you can use "rsync -e ssh" to get a list of specific targets and mirror
    >them locally.


    Yes, rsync is much more clever. I hadn't looked at it before. I'll use
    rsync. Thanks!

    --
    René Pijlman

    Wat wil jij leren? http://www.leren.nl

+ Reply to Thread