- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: ssh to host
Operating System - Linux
1753974
Members
7729
Online
108811
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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
тАО09-18-2007 11:13 PM
тАО09-18-2007 11:13 PM
I have three hosts ( host A , B & C ) , host A can ssh host C without password , now I would like host B can also ssh to host C , if I just overwrite the id_rsa.pub from host B to host C' ~user/.ssh/authorized_keys file , then I think host A will no longer can ssh to host C , can advise if I want BOTH A & B can ssh to host C without password , what can I do ? thx
Solved! Go to Solution.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-19-2007 12:12 AM
тАО09-19-2007 12:12 AM
Solution
You need to append the hostB key to authorized_keys, for example:
hostB# scp id_rsa.pub hostC:/tmp
hostC# cat /tmp/id_rsa.pub >> authorized_keys
hostB# scp id_rsa.pub hostC:/tmp
hostC# cat /tmp/id_rsa.pub >> authorized_keys
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-21-2007 01:53 PM
тАО09-21-2007 01:53 PM
Re: ssh to host
see a below example with H1, H2 and H3 for f
H1
Login with "applmgr" account and check if you have these files -
/home/applmgr/.ssh/id_rsa
/home/applmgr/.ssh/id_rsa.pub
If not then run;
ssh-keygen -t rsa
example -
$ uname -a
HP-UX H1 B.11.11 U 9000/800 2339995041 unlimited-user license
$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/sharma/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/sharma/.ssh/id_rsa.
Your public key has been saved in /home/sharma/.ssh/id_rsa.pub.
The key fingerprint is:
c1:a8:1d:f8:e5:a4:79:10:d3:5c:d8:90:72:0d:f0:84 sharma@H1
Now copy the contents of H1 "/home/applmgr/.ssh/id_rsa.pub" to H2 "/home/applmgr/.ssh/authorized_keys". Append in case the authorized file already exists on H2.
Repeat the same ssh-keygen process for H3 and then append the H3 "/home/applmgr/.ssh/id_rsa.pub" to H2 "/home/applmgr/.ssh/authorized_keys". Once done, H2 should allow passwordless ssh for applmgr account from H3 and H1 both.
P.S - The public/private key pair needs to be generated only once via ssh-keygen and thereafter same keys can be copied to "authorized_keys" on diff. servers for passwordless entry.
H1
Login with "applmgr" account and check if you have these files -
/home/applmgr/.ssh/id_rsa
/home/applmgr/.ssh/id_rsa.pub
If not then run;
ssh-keygen -t rsa
example -
$ uname -a
HP-UX H1 B.11.11 U 9000/800 2339995041 unlimited-user license
$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/sharma/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/sharma/.ssh/id_rsa.
Your public key has been saved in /home/sharma/.ssh/id_rsa.pub.
The key fingerprint is:
c1:a8:1d:f8:e5:a4:79:10:d3:5c:d8:90:72:0d:f0:84 sharma@H1
Now copy the contents of H1 "/home/applmgr/.ssh/id_rsa.pub" to H2 "/home/applmgr/.ssh/authorized_keys". Append in case the authorized file already exists on H2.
Repeat the same ssh-keygen process for H3 and then append the H3 "/home/applmgr/.ssh/id_rsa.pub" to H2 "/home/applmgr/.ssh/authorized_keys". Once done, H2 should allow passwordless ssh for applmgr account from H3 and H1 both.
P.S - The public/private key pair needs to be generated only once via ssh-keygen and thereafter same keys can be copied to "authorized_keys" on diff. servers for passwordless entry.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP