Re: Cannot SFTP into FreeBSD boxes with Midnight Commander
- In reply to: Olivier : "Re: Cannot SFTP into FreeBSD boxes with Midnight Commander"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 17 Nov 2022 02:43:21 UTC
Nov 17, 2022, 02:22 by Olivier.Nicole@cs.ait.ac.th: > iio7@tutanota.com writes: > >> Apparently the default option for "PasswordAuthentication" is set to >> "no" in sshd_config on FreeBSD, which is what is causing the error. On >> OpenBSD and Linux it's default "yes". >> > > I just checked on a machine I am currently installing and the > "PasswordAuthentication No" is commented out by dedfault and I can SSH > to that machine. It may depend on the level of security you choose when > installing FreeBSD? > It's commented out because it's the default setting. When it's set to "no", SFTP via Midnight Commander doesn't work. However, normal SSH and SFTP via the console works fine. Setting it to the upstream default "yes", then SFTP via Midnight Commander works. The install script doesn't change the setting, it's default "no" is documented in the man page as well. The default SSH authentication mechanism is to ask for a username and a password, which is what OpenSSH does when PasswordAuthentication is said to "yes". When the option is changed to "no", using a password doesn't work and you have to login by e.g. a key. However, the FreeBSD version has the option "UsePAM", which is default set to "yes". So this means that PAM is authenticating users. I don't know why this doesn't work with Midnight Commander, but I guess it has to do with exactly how Midnight Commander sends the command. Perhaps someone else can clarify whether I should file this as a bug to the MC maintainer? Kind regards.