From owner-freebsd-questions@FreeBSD.ORG Sun Jan 13 14:56:12 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED74116A420 for ; Sun, 13 Jan 2008 14:56:12 +0000 (UTC) (envelope-from erik@cepheid.org) Received: from mail.cepheid.org (aleph.cepheid.org [72.232.60.94]) by mx1.freebsd.org (Postfix) with ESMTP id DDB9413C457 for ; Sun, 13 Jan 2008 14:56:12 +0000 (UTC) (envelope-from erik@cepheid.org) Received: by mail.cepheid.org (Postfix, from userid 1006) id 3DD269B4058; Sun, 13 Jan 2008 08:56:12 -0600 (CST) Date: Sun, 13 Jan 2008 08:56:12 -0600 From: Erik Osterholm To: takhoos@hotmail.com Message-ID: <20080113145612.GA6298@aleph.cepheid.org> Mail-Followup-To: Erik Osterholm , takhoos@hotmail.com, freebsd-questions@freebsd.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: freebsd-questions@freebsd.org Subject: Re: Switching username using SFTP 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: Sun, 13 Jan 2008 14:56:13 -0000 On Sun, Jan 13, 2008 at 09:38:21AM -0500, takhoos@hotmail.com wrote: > > When I ssh into a system which has different login name from the > system I'm on I use this syntax: ssh -l host.domain.com. > > How does one do this with SFTP on the command line? The -l switch > doesn't work. The man pages on SFTP makes no mention of this. > > -- Joe The man page implies the correct use at the top: sftp [[user@]host[:dir[/]]] So sftp user@host.example.com works. Lower down in the file, it also mentions using options, and it turns out that this works as well: sftp -o User=username host.example.com Erik