HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: run ssh in a setuid program
Operating System - HP-UX
1833501
Members
2850
Online
110052
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
Forums
Discussions
Discussions
Discussions
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
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
10-05-2006 06:49 PM
10-05-2006 06:49 PM
run ssh in a setuid program
I have a setuid program which spawns to run ssh. The problem is, ssh seems not be able to read the key file if the key file is readable only to the user of the setuid program. Ssh asks for the passphrase of the key file, which is actually not password protected. I tried changing the permission of the key file to world readable. Then ssh could read the key file and connected to the server without a password.
Why is this so?
Why is this so?
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2006 06:20 AM
10-09-2006 06:20 AM
Re: run ssh in a setuid program
Raymond
you insert its key in file .ssh of user ?
you insert its key in file .ssh of user ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2006 06:29 AM
10-09-2006 06:29 AM
Re: run ssh in a setuid program
>I have a setuid program which spawns to run
> ssh.
So when this program is running, it acts as
if it were being run by a user with the
program's uid, not the actual user's uid.
> [..] ssh seems not be able to read the key
> file if the key file is readable only to
> the user of the setuid program.
Which is as it should be. A user with the
program's uid should not be able to read a
file which only the actual user can read.
It may not be easy to pretend to be two
different users at one time.
> ssh.
So when this program is running, it acts as
if it were being run by a user with the
program's uid, not the actual user's uid.
> [..] ssh seems not be able to read the key
> file if the key file is readable only to
> the user of the setuid program.
Which is as it should be. A user with the
program's uid should not be able to read a
file which only the actual user can read.
It may not be easy to pretend to be two
different users at one time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2006 06:32 AM
10-09-2006 06:32 AM
Re: run ssh in a setuid program
Shalom,
Having two users involved in a password free transaction is difficult and not really recommended.
If you are being prompted for a passphrase then when you set up your id_dsa.pub or id_rsa.pub you or the user entered a passphrase.
Try doing the ssh-keygen command again without a passphrase and see if that helps.
There is nothing intrinsic to ssh that should be causing this issue.
SEP
Having two users involved in a password free transaction is difficult and not really recommended.
If you are being prompted for a passphrase then when you set up your id_dsa.pub or id_rsa.pub you or the user entered a passphrase.
Try doing the ssh-keygen command again without a passphrase and see if that helps.
There is nothing intrinsic to ssh that should be causing this issue.
SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
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.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP