in reply to Re: qx//, ssh -t (pseudo-tty) and sudo
in thread qx//, ssh -t (pseudo-tty) and sudo
hmm :"),
sorry i didn mentioned it.. this is a part of a script that does many other things..I want a script not a manualy doing this
And SUDO usage is the thing that guerantees security.. as many of u know giving root direct ssh access is not a good thing..i dont do it too :")
it has to always happen trought other user i.e. log as user X and switch to root only if nececary.
Now sudo is the only secure way to give non-root users some privileges, but not all.
Here comes the next barier i.e. the use of keychain(ssh-askpasswd! and so) which prevents multiple time entering password and doesnt transffer passwords over the wire.
In fact there is no other good secure method for restarting services automaticly via scripts over the network. I searched alot :"). if u know other way pls tell me
So back on the problem SUDO for some reason when ask for a password displays the password at the time I type it.
When I was doing this in shell script I solved the problem by specifyng "-t" switch. (with it the password is not shown while I type it.)
Now this trick doesnt work under perl. And from the responses and from my google search it seem to be really tricky thing...