Date: Tue, 13 Mar 2001 23:59:47 -0800 (PST) From: Rick Duvall <maillist@coastsight.com> To: Nick Rogness <nick@rogness.net> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: ssh2 for use in CGI script Message-ID: <Pine.BSF.4.21.0103132357550.43419-100000@ns1.coastsight.com> In-Reply-To: <Pine.BSF.4.21.0103131825110.17634-100000@cody.jharris.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Yes, from the command line (as webadmin), I can do: ssh2 backup And I get right in... Here is a copy of my CGI (my email program will probably wrap the text, so ignore that): #!/bin/sh /usr/local/bin/rsync -e /usr/local/bin/ssh2 -az --delete /usr/local/apache/htdocs/insecure backup: /usr/local/bin/rsync -e /usr/local/bin/ssh2 -az --delete /usr/local/apache/htdocs/secure backup: /usr/local/bin/rsync -e /usr/local/bin/ssh2 -az --delete /usr/local/apache/htdocs/users backup: echo Content-type: text/html echo echo '<html><body><p align="center"><font size="+3">Synchronize Servers</font></p>' echo 'The servers have been synchronized successfully!' echo '<p>[<a href="/">Main Page</a>]' echo '</body></html>' On Tue, 13 Mar 2001, Nick Rogness wrote: > On Tue, 13 Mar 2001, Rick Duvall wrote: > > > I am trying to syncronize my servers with rsync and ssh2. I wrote a shell > > script that would work as a CGI so sync the servers via a web page (runs > > under same username as web server, since the web files are all owned by > > webadmin anyway). It works from the command line, but when i run it as a > > CGI, I get this error in the logfile. Is there any way around this so > > that I can have an admin page set up to do certain things, rather than > > telneting in every time I need to sync it? > > Is ssh setup to login to the other box with no password? via > shosts.equiv or something? > > > Nick Rogness <nick@rogness.net> > - Keep on routing in a Free World... > "FreeBSD: The Power to Serve!" > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0103132357550.43419-100000>