Announcement

Collapse
No announcement yet.

How To Use Custom Named Public/Private Key

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How To Use Custom Named Public/Private Key

    I need to set up keys for multiple server so I want to use custon name files for my keys. For example, trying to set up keys for my local NAS I do:
    xplorer4x4@xplorer4x4-MS-7673:~/.ssh$ ssh-keygen -t rsa
    Generating public/private rsa key pair.
    Enter file in which to save the key (/home/xplorer4x4/.ssh/id_rsa):wdlive
    Enter passphrase (empty for no passphrase):
    Enter same passphrase again:
    Your identification has been saved in wdlive.
    Your public key has been saved in wdlive.pub.
    The key fingerprint is:
    80:{EDITED}8d:ef xplorer4x4@xplorer4x4-MS-7673
    The key's randomart image is:
    {EDITED}
    xplorer4x4@xplorer4x4-MS-7673:~/.ssh$ ssh-copy-id -i ~/.ssh/wdlive.pub root@192.168.1.160
    root@192.168.1.160's password:
    Now try logging into the machine, with "ssh 'root@192.168.1.160'", and check in:
    ~/.ssh/authorized_keys
    to make sure we haven't added extra keys that you weren't expecting.
    When I check ~/.ssh/authorized_keys on the NAS, I see my key is listed, but I still get a password prompt. I guess I need to do something special in this case?
    Last edited by Xplorer4x4; Sep 12, 2012, 12:35 AM.
    OS: Kubuntu 12.10/Windows 8
    CPU: Intel Core i7 2600K
    Motherboard: Gigabyte GA-Z77X-UD5H
    Memory: 2x4GB Corsair Dominator
    Graphics Card: MSI R7770
    Monitor: Dell 2208WFP
    Mouse: Mionix NAOS 5000
    PSU: Corsair 520HX
    Case: Thermaltake Mozart TX
    Cooling: Thermalright TRUE Black Ultra-120 eXtreme CPU Heatsink Rev C
    Hard Drives: 1x180 GB Intel 330 SSD - 1xWD 1 TB Caviar Black - 1xWD 2 TB Caviar Green - 2xWD 3 TB Caviar Green

    #2
    I just realized I was not using SSH2 keys so how do I remove the keys from the NAS? I tried gpg --delete-key user and gpg --delete-secret-key user but no luck.

    EDIT: Solved. Minuets after returning to google I found that I needed to add
    Code:
    Host *
    IdentityFile ~/.ssh/wdlive.pub
    to my ~/.ssh/config file. If you need to add other keys just add another line that says:
    IdentityFile ~/.ssh/configsomekeyfile.pub
    Last edited by Xplorer4x4; Sep 12, 2012, 01:33 AM.
    OS: Kubuntu 12.10/Windows 8
    CPU: Intel Core i7 2600K
    Motherboard: Gigabyte GA-Z77X-UD5H
    Memory: 2x4GB Corsair Dominator
    Graphics Card: MSI R7770
    Monitor: Dell 2208WFP
    Mouse: Mionix NAOS 5000
    PSU: Corsair 520HX
    Case: Thermaltake Mozart TX
    Cooling: Thermalright TRUE Black Ultra-120 eXtreme CPU Heatsink Rev C
    Hard Drives: 1x180 GB Intel 330 SSD - 1xWD 1 TB Caviar Black - 1xWD 2 TB Caviar Green - 2xWD 3 TB Caviar Green

    Comment

    Working...
    X