From owner-freebsd-questions@FreeBSD.ORG Sat Jan 20 06:50:30 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 186D816A400 for ; Sat, 20 Jan 2007 06:50:30 +0000 (UTC) (envelope-from lists@qwirky.net) Received: from public.aci.on.ca (aci.on.ca [205.207.148.251]) by mx1.freebsd.org (Postfix) with ESMTP id B911113C44B for ; Sat, 20 Jan 2007 06:50:29 +0000 (UTC) (envelope-from lists@qwirky.net) Received: from (invalid client hostname: host address literal does not match remote client address)[127.0.0.1] (xtreme-156-171.dyn.aci.on.ca[69.17.156.171] port=4975) by public.aci.on.ca([205.207.148.252] port=25) via TCP with esmtp (1495 bytes) (sender: ) id for ; Sat, 20 Jan 2007 01:50:27 -0500 (EST) (Smail-3.2.0.122-Pre 2005-Nov-17 #1 built 2006-Feb-21) Message-ID: <45B1BBB6.9020905@qwirky.net> Date: Sat, 20 Jan 2007 01:50:30 -0500 From: Jeff Royle User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <009b01c73c5d$a1d11dd0$0300020a@mickey> In-Reply-To: <009b01c73c5d$a1d11dd0$0300020a@mickey> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 0704-0, 18/01/2007), Outbound message X-Antivirus-Status: Clean Subject: Re: Password on command line with SCP X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: lists@qwirky.net List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Jan 2007 06:50:30 -0000 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. > > Thanks! > > _______________________________________________ The only way I know of is to use keys for your authentication. You then can use 'scp -B -i file1 file2 ... example.com:.' Hope that helps. Cheers, Jeff