From owner-freebsd-questions@FreeBSD.ORG Wed Aug 6 10:51:44 2014 Return-Path: Delivered-To: freebsd-questions@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 913674BD for ; Wed, 6 Aug 2014 10:51:44 +0000 (UTC) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 52FBA264B for ; Wed, 6 Aug 2014 10:51:44 +0000 (UTC) Received: from r56.edvax.de (port-92-195-111-1.dynamic.qsc.de [92.195.111.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx01.qsc.de (Postfix) with ESMTPS id 227083CCB1; Wed, 6 Aug 2014 12:51:40 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id s76ApeOr006136; Wed, 6 Aug 2014 12:51:40 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Wed, 6 Aug 2014 12:51:40 +0200 From: Polytropon To: Jos Chrispijn Subject: Re: sftp bug? Message-Id: <20140806125140.f6cf5163.freebsd@edvax.de> In-Reply-To: <53E20808.709@webrz.net> References: <53E20808.709@webrz.net> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: "freebsd-questions@FreeBSD.org" X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Aug 2014 10:51:44 -0000 On Wed, 06 Aug 2014 12:48:40 +0200, Jos Chrispijn wrote: > If I use sftp and the user has a questionmark in his password, the > password is not accepted. Maybe an issue related to keyboard layout? The '?' is a valid character for a password like everyone else. :-) Question: Is the password supplied with a command line? In this case, it might be that the shell is trying to evaluate this special character: % sftp bob:my?password@ftp.example.com would be such a case. You could try using \? or maybe enclosing the password in 'single' quotes (to tell the shell not to try to interpret _anything_ in this string). > Can I bypass this in a configuration file? The (unsafe) FTP program (ftp) accesses a file called ~/.netrc (see "man ftp" for details), surely sftp can do the same. In this file, passwords can be stored. But keep in mind: Those passwords are in _clear text_ inside this file, so make sure permissions are tight! By completely avoiding passwords and instead relying on keys the problem could probably be cured. So no password has to be stored as plain text in a regular file. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...