LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-20-2006, 11:20 AM   #1
hottdogg
Member
 
Registered: Aug 2004
Distribution: opensuse ,debian/ubuntu
Posts: 220

Rep: Reputation: 30
SSH file questions


I want to know about ssh authorized_keys file

1.Is the content of authorized_keys only allow 1 key?
If it allows more than 1 key, how to copy the 2nd, 3rd and so forth of keys?
How to only add new key while still keep the current key intact?

"cp id_rsa.pub authorized_keys" will replace the current content. Editing by hand isn't recommended.

So, any solution?

2. I made the authorized_keys file by myself by copying id_rsa.pub to it(created new automatically, I guess). Is that OK? or authorized_keys should be created by the system after configuring something related to ssh (e.g. ssh-keygen, login ssh for the first time,etc.)
 
Old 03-20-2006, 01:04 PM   #2
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,494
Blog Entries: 2

Rep: Reputation: 68
Quote:
1.Is the content of authorized_keys only allow 1 key?
No. Several. One per line.

Quote:
If it allows more than 1 key, how to copy the 2nd, 3rd and so forth of keys?
How to only add new key while still keep the current key intact?
echo or cat redirecting the output with >> operator.
Code:
$ echo "ssh-dss AAAAB3NzaC1kc3...." >> .ssh/authorized_keys
or
cat >> .ssh/authorized_keys
<paste the key now>
CTRL-D to finish
Quote:
2. I made the authorized_keys file by myself by copying id_rsa.pub to it(created new automatically, I guess). Is that OK?
Yes, this is fine and is the method I use myself.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SSH Questions Meabert Linux - Software 2 12-28-2005 02:24 AM
some SSH questions... nick1 SUSE / openSUSE 2 03-23-2005 06:24 AM
X over ssh: config questions yocompia Linux - Networking 3 09-19-2003 10:28 AM
SSH Questions Tezdread Linux - Networking 7 02-05-2003 05:34 PM
SSH Questions Stevy123 Linux - Networking 4 10-01-2002 06:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration