- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- ssh key management
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2003 07:25 PM
08-31-2003 07:25 PM
ssh key management
I was wondering what the forum thought about issues relating to ssh key management. My initial look into it made me cringe. I have several users, with accounts on several machines, and they need to be able to log in from one host to another without specifying a password. I know this can be done by specifying a .shosts file in each users home directory on each server. Also, there is the preffered way via ssh protocol 2 using RSA authentication. I have gotten this latter method working, but it seems a hassle to set up for multiple users on multiple machines. So, does anyone have any ideas, or know of any good documentation on this issue? What are the best practices regarding this?
Thanks heaps,
- Andrew Gray (IT Support, WorkCover QLD, Australia)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2003 08:51 PM
08-31-2003 08:51 PM
Re: ssh key management
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2003 08:52 PM
08-31-2003 08:52 PM
Re: ssh key management
here u go. this doc is written by a fellow forumer Chris.
-balaji
Chris -> A fantastic write up. Never got the forum to thank u for this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2003 09:00 PM
08-31-2003 09:00 PM
Re: ssh key management
-b-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2003 09:08 PM
08-31-2003 09:08 PM
Re: ssh key management
It's amazing what you take for granted after a while in this business.
I almost posted something along the lines of "I've never used .shosts before, but use the 'authorised_keys' exchagne.", but thought "but isn't that how most people do it anyway?"..
*sighs* Shoulda posted.. ;P
Just went through this kafuffle with a DR machine over in the UK, using 'ssh' to rsync the data on a regular basis (whee!), so it was all fresh in my mind..
Funny thing is that this is documented in the training maual you get for the RHCE..
Information, taken for granted..
*hangs head in shame* Ah well. I try to help wehre I can..
Balaji, SEP, nice doc. Didn't know it existed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2003 09:31 PM
08-31-2003 09:31 PM
Re: ssh key management
-b-
ps: btw, how come u guys are awake now. i thought its day only in india. after a small hibernation, i am back on the forums.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2003 09:36 PM
08-31-2003 09:36 PM
Re: ssh key management
-b-
ps: btw, how come u guys are awake now. i thought its day only in india. after a small hibernation, i am back on the forums.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2003 10:05 PM
08-31-2003 10:05 PM
Re: ssh key management
I've finally figured out what was wrong with my Red Hat 9 server.
Red Hat pulled the old stop up2date from working trick. I downloaded and installed all my utilities and then pulled sendmail out and re-installed.
Suddenly without my 8.11 sendmail.mc file, sendmail works a lot better. I'm wondering of sendmail.mc is no longer needed, but running experiments.
I want the second server to forward all mail to the mail one so when it takes over service during an outage, it just queues mail until the production server is brought back on line
This is somewhat complicated, so I'm up. I'm also worrying about a issue with my son's education. Can't sleep.
Andrew,
If we helped, please assign points.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2003 10:14 PM
08-31-2003 10:14 PM
Re: ssh key management
(Welcome back Balaji !)
J
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2003 10:58 PM
08-31-2003 10:58 PM
Re: ssh key management
--snipped from ur post--
I've finally figured out what was wrong with my Red Hat 9 server.
Red Hat pulled the old stop up2date from working trick. I downloaded and installed all my utilities and then pulled sendmail out and re-installed.
>>> may be u should try apt-rpm when u find time. am setting up a test box here and going t o try it on this box.
Suddenly without my 8.11 sendmail.mc file, sendmail works a lot better. I'm wondering of sendmail.mc is no longer needed, but running experiments.
I want the second server to forward all mail to the mail one so when it takes over service during an outage, it just queues mail until the production server is brought back on line
>>> how are u collecting mails and forwarding. if this is going to be a DNS wont a secondary mx help. if this is going to be an internal mail server and if mail clients directly submit mails to these server, then how abt using a virtual ip address on the production server and then switiching the ip to the second server when u notice there is some issues. may be run a script on a third server which monitors and moves the ip. (idea flicked from MC/SG :-( )
This is somewhat complicated, so I'm up. I'm also worrying about a issue with my son's education. Can't sleep.
>>> hmmm. dont miss ur sleep. let me know if i will be of some help. we can take this offline.
perl -le 'print pack"H*", "62616c616a694062616c616a696e2e6e6574"'
-balaji
ps: 1. andrew, sorry for hijacking this thread.
2. hello jerome. congrats for moving up on the list. not sure if i congratulated u on ur wizardry.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2003 10:59 PM
08-31-2003 10:59 PM
Re: ssh key management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2003 08:39 PM
09-01-2003 08:39 PM
Re: ssh key management
I was really interested in ways people manage the key distribution problem.
In my own research I came upon two interesting ways of working around this.
Firstly, in reply to the document by Vhris Vail, this method is by far the easiest, but it still leaves a security hole in that if someone compromises the server, then they have access to your private key, because it is not encrypted. This might be okay for some situations, where that doesn't matter, but what if it does?
Well, as many of you may know there is a program bundled with open-ssh called ssh-agent. This program allows you to encrypt your private key file and still have password-less logins. The way it works is like this: When you first log into a host, you should run the ssh-agent program. It will ask you ONCE for the password to decrypt the private key, and then will cache the unencrypted key in memory, and ssh will talk to ssh-agent via a unix domain socket and get the private key that way. Thus, each time you run ssh, it won't ask for the key, yet the private key is still encrypted. Of course, it is still possible for a hacker to do a memory dump of the process and get the private key that way.
Another way is with authentication forwarding. You run ssh-agent on a trusted, secure system, and then you configure ssh on each machine to use authentication forwarding (in ssh_config). Then, you can log into a host without a password, and from that host log into another host without a password...what happens is that the authentication is passed back through each ssh session to the originating one which has the ssh-agent running and authenticates from that.
Both these methods are more secure that passwordless private key method explained in Chris Vails document, but not necessarily more convenient.
An excelent document I found on ssh-agent and authentication forwarding, along with another little program to make ssh-agent easier and better to use can be found at:
www-106.ibm.com/developerworks/library/l-keyc.htm
This document explains some of owhat Chris Vail writes about, but continues onto the more advanced topics. Well worth the read. Also, there are two other documents after it:
www-106.ibm.com/developerworks/library/l-keyc2.htm
www-106.ibm.com/developerworks/library/l-keyc3.htm
The author has written a program that goes along with ssh-agent called keychain. Looks useful, although it does make logins slow (but still passwordless).
I am still interested in hearing other peoples stories and/or suggestions.
eg how to get the simplicity of passwordless private key files, with the security of password-protected private key files within ssh??
Thanks again
- Andrew Gray
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2003 09:52 PM
09-01-2003 09:52 PM
Re: ssh key management
But in most environments, I leave it all passworded. I don't mind re-typing a password.
If your talking a 'user' however, ... I have no users who use ssh. Just the admins.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2003 10:49 AM
09-02-2003 10:49 AM
Re: ssh key management
In a situation where an intruder would gain access to one server he would then be able to move from box to box unhindered.
A password should always be required of a user when logging into a box.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2003 10:50 AM
09-02-2003 10:50 AM
Re: ssh key management
logging in without a password is a huge security hole
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2003 11:55 AM
09-02-2003 11:55 AM
Re: ssh key management
I do not think password free login between servers is a security risk if implemented properly.
The public files need permissions to be tight and the file I attached is quite strict about permissions.
The chances of a public key being intercepted and decrypted by anyone other than the NSA is quite low. Still, I do regenerate the keys and distribute them on a regular basis, even though my keys are not passing through the public Internet.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2003 03:31 AM
09-03-2003 03:31 AM
Re: ssh key management
For users, passwords would be, most likely, unacceptable. OTOH, I'm not sure why a user would need to go from one *server* to another (I'm thinking of users with PCs and network logon. Serial connections are another matter.). I would think that they should simply open another session on the second server.
bv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2003 08:29 AM
09-03-2003 08:29 AM
Re: ssh key management
I use ssh-agent and ssh-add to login without passwds. If you are running a recent version of RedHat, Gnome and KDE are factory installed with ssh-agent running and ready to use for your X session. Just type ssh-add in a shell, it should prompt you for a passwd and notify you what keys it is adding. After that you should be able to log into hosts that have your pub keys in the authorized_keys file without a passphrase.
Gottchas:
- No keys in authorized_keys, no passphraseless login.
- sometimes you have to force "ssh -2 host" to make things work. If you run into this problem, you can set the "Protocol=2,1" in ~/.ssh/config to goto ssh2 first.
- Perms have to correct on all directories and files on both ends to do pub key logins.
-Tony
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2003 05:36 PM
09-03-2003 05:36 PM
Re: ssh key management
I also agree with Stephen that it can be an acceptable risk if implemented properly. ie, don't think of it being a bad thing if someone hacks into on server and then another through password-less logins, as long as the two machines are relate. ie, don't think of servers as individual islands, but as grouped, so that servers lookin after one particular application are grouped, and servers looking after another particular application are grouped. It's only really bad if there is password-less logins across groups/applications.
The problem with ssh-agent is that you are still reqired to enter your password (to decrypt the private key file) at least once, which obviously isn't useful for automated scripts etc which need access to other machines. That is why in my previous post, the keychain program looked promising (see www-106.ibm.com/developerworks/library/l-keyc2.htm).
It seems that a script like the one Tony submitted, along with non-password protected private key files is the best way to go so far. But it's not the best idea to have password-less key files...
Thanks for the discussion... Any other ideas/comments?
- Andrew Gray