- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to create trust between servers via ssh keys
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
тАО06-30-2009 11:19 AM
тАО06-30-2009 11:19 AM
I am getting the following error, while trying to login to a server1.How to create trust between Server2 and Server1
Server2$ sudo ssh Server1
Warning: the RSA host key for 'Server1' differs from the key for the IP address '153.6.190.168'
Offending key for IP in /wdroot/.ssh/known_hosts:522
Matching host key in /wdroot/.ssh/known_hosts:894
Are you sure you want to continue connecting (yes/no)?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-30-2009 11:25 AM
тАО06-30-2009 11:25 AM
Solutionedit /wdroot/.ssh/known_hosts
goto line 522
delete line
save and exit
retry and if it does not work, come back here post the new error message you are getting.
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-30-2009 11:41 AM
тАО06-30-2009 11:41 AM
Re: How to create trust between servers via ssh keys
Here is the No of lines in known_hosts in each server
Server1 #"known_hosts" 20 lines, 9248 characters
Server2 #"known_hosts" 939 lines, 496928 characters
There is no Line 522 in server1.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-30-2009 11:48 AM
тАО06-30-2009 11:48 AM
Re: How to create trust between servers via ssh keys
cat /wdroot/.ssh/known_hosts | sed -e "522,522d" > /tmp/kh
cat /tmp/kh > /wdroot/.ssh/known_hosts
this should do it.
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-30-2009 11:55 AM
тАО06-30-2009 11:55 AM
Re: How to create trust between servers via ssh keys
http://www.hpux.ws/?p=10
Remove the offending keys as indicated. Use vi.
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
тАО07-01-2009 06:19 AM
тАО07-01-2009 06:19 AM
Re: How to create trust between servers via ssh keys
I have another question..
is it possible to make trust, if the user dont have his ID on server 2.
Can we make trust between two diffrent users..?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-01-2009 06:26 AM
тАО07-01-2009 06:26 AM
Re: How to create trust between servers via ssh keys
You ask:
is it possible to make trust, if the user dont have his ID on server 2.
Can we make trust between two diffrent users..?
Yes.
The document I posted has a step. You take the users public key .pub transfer it to the server you wish it to log into.
Create or append a file in the .ssh directory called authorized_keys
If you have in the authorized_keys file for user shmuel the public key for user donny from another server a "trust" relationship as you call it is established. I call it exchange of public keys.
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
тАО07-01-2009 06:29 AM
тАО07-01-2009 06:29 AM
Re: How to create trust between servers via ssh keys
Yes you can create trust but no, it will not trust by default.
Lets say:
You are user2 on server2
You want to ssh to server1 as user1
You have a private key on server2 at /home/user2/.ssh/id_rsa
And you have complementary public key on server1 inside /home/user1/.ssh/authorized_keys file
to get to user1@server1 from user2@server2 all you need to do is
On server2
# ssh -l user1 server1
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-01-2009 07:04 AM
тАО07-01-2009 07:04 AM
Re: How to create trust between servers via ssh keys
Here is the problem, User dont have his ID on server1. So if I removed the offending key..
will he be going to login in server1 as root..?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-01-2009 07:09 AM
тАО07-01-2009 07:09 AM
Re: How to create trust between servers via ssh keys
Please see link to prior thread which explains setting up from scratch.
http://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=1125086
Regards,
Berd
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-01-2009 07:45 AM
тАО07-01-2009 07:45 AM
Re: How to create trust between servers via ssh keys
>will he be going to login in server1 as root..?
unless you specify which username to use on the remote server with -l switch, it will use your local login name. If you are root on server2, running command:
ssh server1
will use root username on server1, whereas
ssh -l user1 server12
will try to login as user1 on the remote server.
There has to be a username to log in as on the remote server otherwise your attempt will be refused, regardless if you are using "-l username" or just letting it go default. Lack of username specification will not default your login as root, as you are expecting, if I'm not misunderstanding,
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-12-2009 12:34 AM
тАО07-12-2009 12:34 AM