sudo + ssh..

Mridul Pentapalli MridulP at virtusa.com
Tue Apr 8 02:46:12 EDT 2003


Thanks for the response. I did wonder about the order in which the commands
are called.

The tricky thing however is that the password is being asked not for root,
but for the user blah.

ntms at 1.2.3.4's password:
and not
root at 1.2.3.4's password:

I will try with adding an empty passphrase for root, but I doubt whether
this is the way to go. 

Regards,
Mridul.

-----Original Message-----
From: donald.ritchey at exeloncorp.com
[mailto:donald.ritchey at exeloncorp.com]
Sent: Monday, April 07, 2003 6:56 PM
To: Mridul Pentapalli
Subject: RE: sudo + ssh..


You need to configure ssh for root on your machine not to need a passphrase.

Look at the ordering of events for your desired action.

1.  sudo (to root, since you didn't specify a user).

2.  ssh -l blah <remote-machine> (this is where you need to set up a
no-passphrase link)

3.  sudo to root to run 'netstat -p'

Set up ssh so that a connection to 1.2.3.4 does not require a passphrase for
root and
things should work as you want.

Don
Donald L. (Don) Ritchey
E-mail:  Donald.Ritchey at exeloncorp.com


-----Original Message-----
From: Mridul Pentapalli [mailto:MridulP at virtusa.com]
Sent: Monday, April 07, 2003 6:52 AM
To: sudo-users at sudo.ws
Subject: sudo + ssh..


Hi,

I sent a mail to comp.security.ssh but no reply. I'm hoping that you guys
have a pointer towards the solution... so here goes...

My program is run by another program using sudo. I need to use netstat on a
remote machine. The command ends up looking like this

sudo ssh -l blah 1.2.3.4 sudo netstat -p

This asks me for the password of blah at 1.2.3.4. 

I have configured the remote machine in such a way that I can connect to it
with an empty passphrase. 

ssh -l blah 1.2.3.4 sudo netstat -p 

works without asking me for any password.

Is there a way I can get the ssh to use the passphrase. Since this system
call is being invoked from within a program, I do not want to pass the
password every time.

Regards,
Mridul.

"Code softly and carry a big debugger."


____________________________________________________________ 
sudo-users mailing list <sudo-users at sudo.ws>
For list information, options, or to unsubscribe, visit:
http://www.sudo.ws/mailman/listinfo/sudo-users


************************************************************************
This e-mail and any of its attachments may contain Exelon Corporation
proprietary information, which is privileged, confidential, or subject 
to copyright belonging to the Exelon Corporation family of Companies. 
This e-mail is intended solely for the use of the individual or entity 
to which it is addressed.  If you are not the intended recipient of this 
e-mail, you are hereby notified that any dissemination, distribution, 
copying, or action taken in relation to the contents of and attachments 
to this e-mail is strictly prohibited and may be unlawful.  If you have 
received this e-mail in error, please notify the sender immediately and 
permanently delete the original and any copy of this e-mail and any 
printout. Thank You.
************************************************************************



More information about the sudo-users mailing list