Women in Technology

Hear us Roar



Hack:   Quick Logins with ssh Client Keys
Subject:   Novice - almost caught by existing authorized_keys2
Date:   2003-12-30 22:32:09
From:   anonymous2
Response to: Don't use plaintext keys for interactive logins

I'm a novice, and tried to use this command today.


Fortunately, I remembered at the last moment that the consultant who had set up my system had an existing keyring. I went in and looked prior to running the command. Sure enough - there was authorized_keys2 just setting there, waiting to be overwritten.


But now I'm screwed, because the hack doesn't tell me - a novice - how to append the key onto the existing key. And I'm afaid to just go scp .ssh/id_rsa.pub >> server:.ssh/authorized_keys2 in case it doesn't work right, and I screwup my existing file.


Help!


Plus what's this about authorized_keys2 itself being depreciated? I thought this was a new book?! I would have assumed we'd be getting the very latest in technology.


Can someone (in desending priority order) please:


a: give me the command to safely append to the existing authorized_key2 file,
b: point me to how I can create a key-pair I can split between Linux and Windows, so I can use this trick with PuTTY to connect from Windows to my Linux servers, and
c: if we shouldn't be using authorized_key2 because its depreciated, correct the hack to the proper usage, and tell me how to fix my current authorized_key2 configuration to the proper usage/configuration.


Thank you very much.

Full Threads Newest First

Showing messages 1 through 2 of 2.

  • Novice - almost caught by existing authorized_keys2
    2005-03-11 14:24:38  rodlinux [View]

    I tried this with solaris. I scp using the reccomended file. But then I did:

    cat authorized_keys2 >> authorized_keys
  • Novice - almost caught by existing authorized_keys2
    2005-09-08 14:04:31  timlewis1 [View]

    You can append your key as follows, substitute relevant values for userid and hostname.

    $ cat ~/.ssh/id_rsa.pub | ssh -l userid hostname "cat - >>.ssh/authorized_keys2"

Showing messages 1 through 2 of 2.