From owner-freebsd-questions Tue Mar 13 16: 0: 5 2001 Delivered-To: freebsd-questions@freebsd.org Received: from ns1.coastsight.com (ns1.coastsight.com [208.46.230.17]) by hub.freebsd.org (Postfix) with ESMTP id CC22337B749 for ; Tue, 13 Mar 2001 15:59:52 -0800 (PST) (envelope-from maillist@coastsight.com) Received: from ns1.coastsight.com ([208.46.230.17]) by ns1.coastsight.com with esmtp (Exim 2.05 #1) id 14d6CB-000Bvm-00; Tue, 13 Mar 2001 23:59:47 -0800 Date: Tue, 13 Mar 2001 23:59:47 -0800 (PST) From: Rick Duvall To: Nick Rogness Cc: freebsd-questions@FreeBSD.ORG Subject: Re: ssh2 for use in CGI script In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 '

Synchronize Servers

' echo 'The servers have been synchronized successfully!' echo '

[Main Page]' echo '' 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 > - 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