How to setup passwordless scp in a script - SSH

This is a discussion on How to setup passwordless scp in a script - SSH ; Hi, We are using SSH tectia and iam preparing script for doing multiple scp's without an interactive password. I tried by generating keys and copying public key in clients authorized_keys2. But still scp is prompting for password: Please help me ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: How to setup passwordless scp in a script

  1. How to setup passwordless scp in a script

    Hi,
    We are using SSH tectia and iam preparing script for doing
    multiple scp's without an interactive password. I tried by generating
    keys and copying public key in clients authorized_keys2. But still
    scp
    is prompting for password:

    Please help me in this regard..





  2. Re: How to setup passwordless scp in a script

    >>>>> "ravi" == ravi <2ravip@gmail.com> writes:

    ravi> Hi, We are using SSH tectia and iam preparing script for doing
    ravi> multiple scp's without an interactive password. I tried by
    ravi> generating keys and copying public key in clients
    ravi> authorized_keys2. But still scp is prompting for password:

    ravi> Please help me in this regard..

    Read the Tectia docs; it does not use an "authorized_keys2" file, but
    rather an "authorization" file with a different syntax.

    --
    Richard Silverman
    res@qoxp.net


  3. Re: How to setup passwordless scp in a script

    Richard E. Silverman a écrit :
    >>>>>> "ravi" == ravi <2ravip@gmail.com> writes:

    >
    > ravi> Hi, We are using SSH tectia and iam preparing script for doing
    > ravi> multiple scp's without an interactive password. I tried by
    > ravi> generating keys and copying public key in clients
    > ravi> authorized_keys2. But still scp is prompting for password:
    >
    > ravi> Please help me in this regard..
    >
    > Read the Tectia docs; it does not use an "authorized_keys2" file, but
    > rather an "authorization" file with a different syntax.
    >


    The best thing to do is to test if scp works with or without password...
    The only difference between the two method is setting a password or not
    when generating the key...

    EnjoY!

    --
    Yves "M'vy" Stadler
    Étudiant en sécurité informatique
    Université Paul Verlaine [MIM/SSIC]

    http://mvyonline.paradisia.net


    _|
    _| _| _|
    _|_| _|_| _| _| _| _|
    _| _| _| _| _| _| _|
    _| _| _| _| _| _|
    _| _| _| _|_|_|
    _|
    _|_|

    "Il vaut mieux mobiliser son intelligence sur des conneries
    que mobiliser sa connerie sur des choses intelligentes."

  4. Re: How to setup passwordless scp in a script

    ravi <2ravip@gmail.com> writes:

    >Hi,
    > We are using SSH tectia and iam preparing script for doing
    >multiple scp's without an interactive password. I tried by generating
    >keys and copying public key in clients authorized_keys2. But still
    >scp
    >is prompting for password:


    >Please help me in this regard..


    Since we have no idea what you have done, we have no idea what help you
    need.
    You need the client's public keys in your authorized_keys file (there is
    not 2 at end of it. That disappeared about 4 years ago). This assumes the
    client is connecting to you. If you are connecting to the client thn yours
    needs to be in their authorized_keys file.







  5. Re: How to setup passwordless scp in a script

    On 2008-01-04, Unruh wrote:
    > ravi <2ravip@gmail.com> writes:
    >
    >>Hi,
    >> We are using SSH tectia and iam preparing script for doing
    >>multiple scp's without an interactive password. I tried by generating
    >>keys and copying public key in clients authorized_keys2. But still
    >>scp
    >>is prompting for password:

    >
    >>Please help me in this regard..

    >
    > Since we have no idea what you have done, we have no idea what help you
    > need.
    > You need the client's public keys in your authorized_keys file (there is
    > not 2 at end of it. That disappeared about 4 years ago). This assumes the
    > client is connecting to you. If you are connecting to the client thn yours
    > needs to be in their authorized_keys file.


    As Richard has said authorized_keys is the wrong file for Tectia. If you
    have Tectia on _both_ ends and you use the ~/.ssh2/authorisation file properly
    you should get this to work. Make sure any man pages you read on this are the
    Tectia sshd2 pages (as opposed to ssh1 or any other version).

    If one of the peers is OpenSSH instead of Tectia it all gets more difficult.
    The SECSH network protocol (SSH2) works between all of OpenSSH, F-Secure
    and Tectia but details such as command-names, config filename and content
    and key formats are different. (As far as I've observed they seem the same
    between Tectia and F-Secure but both of those are different from OpenSSH).
    So scp run as a client does not merely perform the SECSH protocol it also
    throws in some communication with the scp program on the server side to
    communicate what it wants done by way of file transfer. These details
    differ so that using scp between OpenSSH and one of the other versions
    does not work at all without major tinkering.

    So if you are contemplating file transfer between OpenSSH and Tectia
    reasonable approaches may be:
    - use sftp instead of scp
    - look at scpi which speaks its own transfer protocol on top of SECSH
    - study the rsh and tar man pages for ideas along the lines of
    ssh server 'cd /var/tmp && tar xvof -' < mystuff.tar

    --
    Elvis Notargiacomo master AT barefaced DOT cheek
    http://www.notatla.org.uk/goen/

+ Reply to Thread