Question on remote command execution - SSH

This is a discussion on Question on remote command execution - SSH ; Hi, I created keys using ssh-keygen command and keys are stored in default locations. I copied identity.pub file to authorized_keys file. I could run remote commands. But I have few questions 1 . When I try to run remote command, ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Question on remote command execution

  1. Question on remote command execution

    Hi,

    I created keys using ssh-keygen command and keys are stored in default
    locations. I copied identity.pub file to authorized_keys file. I could
    run remote commands. But I have few questions

    1 . When I try to run remote command, it prompts like the following
    Are you sure you want to continue connecting (yes/
    no)?
    I dont want this to be prompted. I want to say YES by default. Is
    there anyway i can achieve this without a prompt?


    2. when i run ssh-keygen, it creates keys, this prompts user for
    passphrase, private key file location. Is there anyway i can avoid
    user prompting and take default values by default.

    Thanks in advance,
    Sandeep

  2. Re: Question on remote command execution

    On 2007-12-27, sandy wrote:
    > I created keys using ssh-keygen command and keys are stored in default
    > locations. I copied identity.pub file to authorized_keys file. I could
    > run remote commands. But I have few questions
    >
    > 1 . When I try to run remote command, it prompts like the following
    > Are you sure you want to continue connecting (yes/
    > no)?
    > I dont want this to be prompted. I want to say YES by default. Is
    > there anyway i can achieve this without a prompt?


    Yes but are you sure you want to? That should only happen then first
    time you connect, and that host key is the only guarantee that you
    have that the connection is not being intercepted by a "man in the
    middle" attack.

    > 2. when i run ssh-keygen, it creates keys, this prompts user for
    > passphrase, private key file location. Is there anyway i can avoid
    > user prompting and take default values by default.


    Yes but having a key without a passphrase is usually a bad idea.
    See this for a description of why:

    http://www.snailbook.com/faq/no-passphrase.auto.html

    If you absolutely must do these things, the answers to your questions
    are in the ssh(1) and ssh-keygen(1) man pages respectively.

    --
    Darren Tucker (dtucker at zip.com.au)
    GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69
    Good judgement comes with experience. Unfortunately, the experience
    usually comes from bad judgement.

+ Reply to Thread