Find the answer to your Linux question:
Results 1 to 3 of 3
am using openSSH on Debian Lenny. For years now I've used ssh key create by using ssh-keygen -t rsa It offers the default name of id_rsa (which, of course, creates ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2009
    Posts
    4

    Openssh: renaming keys


    am using openSSH on Debian Lenny. For years now I've used ssh key create by using

    ssh-keygen -t rsa

    It offers the default name of id_rsa (which, of course, creates the files id_rsa and id_rsa.pub).

    In the past I've always renamed these keys, e.g., id_rsa-SERVERNAME, but this version doesn't appear to work with renamed keys. I tried non-default keys and could not get them to work. I used ssh -v user-at-server to see what was happening: It appears that ssh looks only for id_rsa ... is it possible to rename the keys? I google, but got some answers about ssh-add that didn't seem to work.

    Thoughts? Is there something I've missed ... this set me back a couple of hours recently ....

  2. #2
    Linux Enthusiast scathefire's Avatar
    Join Date
    Jan 2010
    Location
    Western Kentucky
    Posts
    626
    Are you talking about public-key authentication?

    Perhaps you should try:
    Code:
    PubkeyAuthentication yes
    AuthorizedKeysFile      .ssh/name-of-your-key
    linux user # 503963

  3. #3
    Linux User
    Join Date
    Nov 2009
    Location
    France
    Posts
    292
    There are many authentication methods with OpenSSH and your post is not much informative.
    I understand you want to authenticate using private/public key on a remote server, with the ssh client. You want to use a renamed private key other than id_rsa.

    Quoting ssh man pages :

    -i -file ... -identity_file
    Selects a file from which the identity (private key) for RSA or DSA authentication is read. The default is ~/.ssh/identity for protocol version 1, and ~/.ssh/id_rsa and ~/.ssh/id_dsa for protocol version 2. Identity files may also be specified on a per-host basis in the configuration file. It is possible to have multiple -i options (and multiple identities specified in configuration files).
    So you can have much flexibility if you specify the right options in ssh_config.
    0 + 1 = 1 != 2 <> 3 != 4 ...
    Until the camel can pass though the eye of the needle.

  4. $spacer_open
    $spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •