Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Aug 2014 12:51:40 +0200
From:      Polytropon <freebsd@edvax.de>
To:        Jos Chrispijn <kernel@webrz.net>
Cc:        "freebsd-questions@FreeBSD.org" <freebsd-questions@FreeBSD.org>
Subject:   Re: sftp bug?
Message-ID:  <20140806125140.f6cf5163.freebsd@edvax.de>
In-Reply-To: <53E20808.709@webrz.net>
References:  <53E20808.709@webrz.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140806125140.f6cf5163.freebsd>