From owner-freebsd-questions@FreeBSD.ORG Sat Jan 20 07:56:48 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5DEBA16A400 for ; Sat, 20 Jan 2007 07:56:48 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.freebsd.org (Postfix) with ESMTP id 275CE13C428 for ; Sat, 20 Jan 2007 07:56:48 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.6/8.13.8) id l0K7ulqG000848; Sat, 20 Jan 2007 01:56:47 -0600 (CST) (envelope-from dan) Date: Sat, 20 Jan 2007 01:56:46 -0600 From: Dan Nelson To: Jeff Royle Message-ID: <20070120075645.GB87905@dan.emsphone.com> References: <009b01c73c5d$a1d11dd0$0300020a@mickey> <45B1BBB6.9020905@qwirky.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <45B1BBB6.9020905@qwirky.net> X-OS: FreeBSD 6.2-PRERELEASE User-Agent: Mutt/1.5.13 (2006-08-11) Cc: freebsd-questions@freebsd.org Subject: Re: Password on command line with SCP X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Jan 2007 07:56:48 -0000 In the last episode (Jan 20), Jeff Royle said: > Don O'Neil wrote: > > Is there any way to pass the password for an SCP command via the > > command line as a switch? I'd like to embed SCP in a script and > > pass the password once through a command line input from the master > > script... By defauly any time I use the -B mode it says passwords > > are required, and without -B it asks for the password after the > > command starts to execute. > > The only way I know of is to use keys for your authentication. > > You then can use 'scp -B -i file1 file2 ... example.com:.' You can also use ports/lang/expect to script entering the password, but it's more fragile than using keys. -- Dan Nelson dnelson@allantgroup.com