Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
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?

Replies are listed 'Best First'.
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?
Corion idly wonders about creating a series of HTTP requests. There seems to be no framework to generate a series of HTTP requests, like "try all these requests"
[Corion]: This is vaguely inspired by that list of "nasty" strings, which I'd like to replace among HTTP parameters, just to see whether the application crashes, but also for easy downloading of a list of URLs etc
[Corion]: Maybe I'll just conoct something using Algorithm::Permute to create an (OO) generator for such requests, or a simple function.
[Corion]: For testing I imagine one would want to test a random sampling of such "bad"/"unexpected" requests, while for downloading, one would want to generate them all in order, but not necessarily as a huge list

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (8)
As of 2017-01-16 15:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (151 votes). Check out past polls.