Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Jan 2008 08:56:12 -0600
From:      Erik Osterholm <freebsd-lists-erik@erikosterholm.org>
To:        takhoos@hotmail.com
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Switching username using SFTP
Message-ID:  <20080113145612.GA6298@aleph.cepheid.org>
In-Reply-To: <BAY124-W15367F1F68DE6567F0796FAA450@phx.gbl>
References:  <BAY124-W15367F1F68DE6567F0796FAA450@phx.gbl>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
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



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?20080113145612.GA6298>