Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: perl & ssh

by azatoth (Curate)
on Aug 16, 2001 at 16:26 UTC ( #105345=note: print w/ replies, xml ) Need Help??


in reply to perl & ssh

Yep.

When you set up your ssh stuff using ssh-keygen, you set a password which is stored in authorized_keys. Simply re-run /usr/bin/ssh-keygen, and hit enter twice when prompted for the password.

job done.

Azatoth a.k.a Captain Whiplash

Make Your Die Messages Full of Wisdom!
Get YOUR PerlMonks Stagename here!
Want to speak like a Londoner?


Comment on Re: perl & ssh
Re: Re: perl & ssh
by Anonymous Monk on Aug 16, 2001 at 18:00 UTC
    Hi Captain Whiplash. OK, thanks, that works fine! Updated the known_hosts file locally and authorized_keys at the other end. Another question: I've now created a web interface where I can click on different buttons and to gather information from remote server and I also should be able to stop/start deamons. I would need to be able to switch to root while running the script on remote machine. At the moment it fails (of course) because the effective user is nobody and I would need to be able to switch users to root. Any ways around this? Or is this too dangerous. Thanks!
      One common way to trigger an action which need root from a web server or other non priviliged account is to the use of an intermediary file. Have the web server write the required to a file, for example a uniquely named file in /tmp. Have a job run from root's crontab that reads the files and performs required actions.

      You lose the interactivity ("your command failed: $errormsg") but that can only be reached I think by giving root privs to your web server, something you really really don't want to do.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://105345]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (12)
As of 2014-07-28 13:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (199 votes), past polls