SSH Configuration question

Discussion in 'Mac Programming' started by spaceballl, Apr 9, 2008.

  1. macrumors 68030

    spaceballl

    Joined:
    Nov 2, 2003
    Location:
    Silicon Valley
    #1
    Hi all,

    So every time I google around for SSH tutorials, they always start from ground one... run ssh-keygen to generate the private / public key pair, etc etc.

    However, I already have my public key on the remote system and I have the private key file on my current system. How do I "import" this key so that it loads by default.

    When I boot up my mac and go into terminal, when I run
    Code:
    ssh-add -l
    it says
    So I need to run
    Code:
    ssh-add my_private_key
    and then if I run
    Code:
    ssh-add -l
    , it lists my identity - how do I configure my system to load this key up by default?? Thanks!
     
  2. macrumors member

    cruzrojas

    Joined:
    Mar 26, 2007
    Location:
    USA
    #2
    You can modify the file .bash_profile located in your home directory and add the line

    Code:
    ssh-add my_private_key 
    at the end of the file. This will import the private key as soon as you open a terminal window.
     
  3. macrumors 603

    jeremy.king

    Joined:
    Jul 23, 2002
    Location:
    Fuquay Varina, NC
  4. macrumors 6502a

    Joined:
    Sep 3, 2005
    Location:
    Cramlington, UK
    #4
    Have you tried putting your private key in a file called id_dsa in your .ssh directory?

    b e n
     

Share This Page