Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

SSH tunneling, CGI or something better

by Bugorr (Novice)
on Aug 15, 2005 at 20:23 UTC ( [id://483973]=perlquestion: print w/replies, xml ) Need Help??

Bugorr has asked for the wisdom of the Perl Monks concerning the following question:

Updated changes marked by >>> below! Hi, I need one box to talk to the other box remotely. It can be done using SSH tunneling or CGI web services. Would someone recommend anything better then that? Currently we are using SSH tunneling and it's very cheesy. Apreciate any help in advance. >>>>>>>> Thank you for all quick replies. My task is pretty simple. I need to execute script on remote system. Both machines running Linux OS. Currently using SSH tunneling, was thinking if there's a better way of doing it?

Replies are listed 'Best First'.
Re: SSH tunneling, CGI or something better
by merlyn (Sage) on Aug 15, 2005 at 20:25 UTC
Re: SSH tunneling, CGI or something better
by socketdave (Curate) on Aug 15, 2005 at 20:26 UTC
    Talk to a remote box. That's a pretty nebulous topic. Do you need to execute commands on a remote system? Do you need to transfer files? What OS is on each of the systems. Describe your situation in a lot more detail and someone may be able to point you in the right direction.
Re: SSH tunneling, CGI or something better
by b10m (Vicar) on Aug 15, 2005 at 20:26 UTC

    "talk to the other box remotely" isn't really helpful. What exactly would you like to accomplish here? Yes, SSH tunnels are nice (not cheesy at all, IMHO), but sometime overkill. Sometimes, a simple CGI script will help out too, or the Jabber protocol, or SMTP, or SNMP, it all depends on what you want 'the other box' to reply.

    --
    b10m

    All code is usually tested, but rarely trusted.
Re: SSH tunneling, CGI or something better
by superfrink (Curate) on Aug 16, 2005 at 04:36 UTC
    How do you want it to be better? Do you want to use less bandwidth? Do you want to start the script running and not have to keep a network connection open? Do you care if anyone else on the network can run the script? Do you care if people watching the network traffic are able to see something the script prints out? Are you tired of having to type in a password each time you run the script? Do you not like having to keep SSH keys on one of the machines for logging into the other?

    Answers to the above questions indicate the mechanisms you should be using for running scripts on a remote machine.

    I often use ssh with a password when I want to run the command manually.

    For periodic cron jobs like backing up data I use ssh keys to keep the data encrypted and not require a login. (Just use rsync with --rsh=ssh.)

    If I just wanted to grab the machine's load average and vital stats I would consider using a CGI because it doesn't require a login and I don't care if anyone sees the data.
Re: SSH tunneling, CGI or something better
by injunjoel (Priest) on Aug 15, 2005 at 20:53 UTC
    Greetings all,
    Not sure if this would help but you might look into RPC::Simple. You would need to investigate setting up the remote procedures and such.

    -InjunJoel
    "I do not feel obliged to believe that the same God who endowed us with sense, reason and intellect has intended us to forego their use." -Galileo
Re: SSH tunneling, CGI or something better
by xorl (Deacon) on Aug 16, 2005 at 12:38 UTC
    -- for saying SSH is cheesy. Check out [id://How (Not) To Ask A Question]

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://483973]
Approved by b10m
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (8)
As of 2024-04-19 14:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found