- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- SSH, ServiceGuard, and known_hosts file
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
Discussions
Discussions
Discussions
Forums
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
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-21-2009 10:18 AM
тАО08-21-2009 10:18 AM
The problem is this; a userid establishes contact with a SG package, e.g., "$ssh pkgname", and creates an entry in the known_hosts file. Later, the package migrates to another node, and SSH then mistakenly thinks I have a man-in-the-middle hack. In the interest of being brief, I will assume you, the reader, understands why.
One way to resolve this is to ensure all cluster nodes have the same digital ID or fingerprint. However, this would force me to have all my users re-create their known_hosts file, and so I would much prefer to use host name aliasing within the known_hosts file instead.
My systems use HP's SSH version 4.40.007, and the format of known_hosts is unlike other versions in that the host and IP does not appear at the beginning of the known_host file record. All the documentation I have (O'Reilly, etc), show a different format for known_hosts.
Has anyone on this forum ever implemented known_hosts aliasing with SSH by modifying the known_hosts file? Any feedback would be appreciated.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-21-2009 11:29 AM
тАО08-21-2009 11:29 AM
Re: SSH, ServiceGuard, and known_hosts file
Have you considered putting the "/home" or whatever directory you have set up as your users home directory, into the package? That way the userid accounts follow the package, hence so does their associated .ssh files.
Like I said, just a thought,
Rgrds,
Rita
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-21-2009 11:58 AM
тАО08-21-2009 11:58 AM
SolutionThere's actually a pretty slick way to work around this. You don't want to use the same host key for all the nodes - that weakens the security that we're using ssh for in the first place.
The trick is to use hostkeyaliases in the ~/.ssh/config file and the known_hosts file.
First, configure ~/.ssh/config:
host mjp
hostname sapmjpdb.myco.com
user oracle
HostKeyAlias MJP
In the known hosts, the format for the file is:
${host},${ip},${aliase} ${rest-o-key}
So, you can have:
node1,192.168.12.10,MJP ssh-rsa AAA [[snip]]
node2,192.168.12.12,MJP ssh-rsa AAA [[snip]]
once all that's in place, you can:
ssh mjp ls -ld /tmp
and have it work regardless on which node sapmjpdb is running.
I used to have a lessons learned entry on this but it got hosed when my firewall died. I'll have to regenerate it as it's pretty nice way to have your cake and eat it too.
HTH;
Doug O'Leary
------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-21-2009 12:02 PM
тАО08-21-2009 12:02 PM
Re: SSH, ServiceGuard, and known_hosts file
And, having read the rest of your post now ( :( )...
it sounds like you have your known hosts file hashed.
Make sure "HashKnownHosts no" is set in /opt/ssh/etc/ssh_config. Unfortunately, you'll have to blast the file and regenerate it.
Doug O'leary
------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-21-2009 12:09 PM
тАО08-21-2009 12:09 PM
Re: SSH, ServiceGuard, and known_hosts file
Thanks for everyone assistance!
Mark Z
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-25-2009 04:55 AM
тАО08-25-2009 04:55 AM
Re: SSH, ServiceGuard, and known_hosts file
The first step was resolving the HASH of the known_hosts file. I believe Doug suggested turning off the HASH in the clients config file, but in the end, I used this command to generate the un-hashed record in known_hosts:
$ ssh -o "HashKnownHosts no"
Then its a simple matter of editing the known_hosts file to add the package alias. Once that was done, everything fell in place.
There is a good discussion of this problem in O'Reilly's SSH Definitive Guide, see Chapter Three, page 82, which also has syntax examples of how to add the package alias.
If after editing the known_hosts file, you would prefer to re-HASH it, I believe you can use this command (below):
ssh-keygen -H
Thanks for everyones help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-25-2009 04:57 AM
тАО08-25-2009 04:57 AM