- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- not able to do passwordless ssh as normal user
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
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
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
03-04-2013 08:22 PM
03-04-2013 08:22 PM
Hi Team,
Aim:-
=====
User want to set up a passwordless ssh for a user user1 from the sever A to the server B
Actions Performed :-
================
1) Logged to the server A as root
2) su to the normal user (user1)
3) created the ssh-keygen
4) copied the key from server A to server B
5) Now as that normal user i am able to do passwordless ssh to hpux79a4
Now the customer requirement:
==========================
The user will log in to the server as another normal user (user2) then execute the below command
Server A : user2 $ > ssh user1@server B date
Here its asking for password ...
Could you please help me on this
Regards
Solved! Go to Solution.
- Tags:
- ssh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2013 08:30 PM
03-04-2013 08:30 PM
Re: not able to do passwordless ssh as normal user
HI,
In server B,copy the key to authorized_keys file.
just like,
cat id_rsa.pub > authorized_keys.
regards
Madhu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2013 08:32 PM
03-04-2013 08:32 PM
Re: not able to do passwordless ssh as normal user
Hi,
if there are more eys
append as
cat id.rsa.pub >> authorized_keys
regards
Madhu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2013 08:48 PM
03-04-2013 08:48 PM
Re: not able to do passwordless ssh as normal user
Hi Madhu,
Thanks for the reply.
I had copied the key to that file.
And i am able to do passwordless ssh as user1. I am facing the issue when i am following the below process
1) Logging to the server A as user2
2) ssh user1@Server B date ========> Here its asking for password
If i am logging ot server A as user1 and doing the below command its working
ssh server B date ========> this is working fine
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2013 05:34 AM
03-05-2013 05:34 AM
SolutionIn general, if you want to allow user X at server A to login as user Y to server B, the requirements are:
- there must be a SSH private key in ~userX/.ssh/id_rsa on server A
- the matching public key must be added to ~userY/.ssh/authorized_keys on server B.
In your case, your user1 now has an appropriate set-up for passwordless SSH for logging in as user1@serverB.
To allow user2@serverA to login as user1@serverB too, the best practice is to generate another SSH key pair as user2@serverA, and then add user2's public key to ~user1/.ssh/authorized_keys on serverB.
# cat user2key.pub >> ~user1/.ssh/authorized_keys
The authorized_keys file can hold an unlimited number of public keys (although if you have a massive number of public keys, login may be slow).
The reason for creating a separate key for each user is: if one of the users misplaces his/her private key (so that an unauthorized person may use it), you can easily remove the matching public key from the authorized_keys file and replace it with a new public key, without causing any inconvenience to the other users.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2013 09:27 PM
03-05-2013 09:27 PM
,Re: not able to do passwordless ssh as normal user
Hi MK,
Thanks for the reply, the issue is resolved
Resolved