Date: Thu, 17 Nov 2022 02:59:59 +0000 From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 267819] misc/mc Midnight Commander cannot SFTP into FreeBSD with PasswordAuthentication set to no and UsePAM set to yes Message-ID: <bug-267819-7788@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D267819 Bug ID: 267819 Summary: misc/mc Midnight Commander cannot SFTP into FreeBSD with PasswordAuthentication set to no and UsePAM set to yes Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Many People Priority: --- Component: Individual Port(s) Assignee: danfe@FreeBSD.org Reporter: iio7@tutanota.com Assignee: danfe@FreeBSD.org Flags: maintainer-feedback?(danfe@FreeBSD.org) 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 13.1 version also has= the option "UsePAM", which is default set to "yes". So this means that PAM is authenticating users. With that setup regular SSH and SFTP into the FreeBSD box via the console works, but using Midnight Commander to SFTP into the FreeBSD box doesn't wo= rk and it fails with 'Cannot chdir to "/sftp://foo"' Changing the "PasswordAuthentication" option to "yes" solves the issue. I am not sure why Midnight Commander fails when it's PAM that is authentica= ting users, but I suspect it has to do with the format of the command being send. Steps to recreate the issue: 1. Have a FreeBSD box with SSH access running. Make sure the defaults setti= ngs are set, "PasswordAuthentication" is "no" and "UsePAM" is "yes". 2. Open Midnight Commander and use the MENU option F9. Choose "SFTP Link" a= nd input the username, password, hostname, etc. of the FreeBSD box with SSH running.=20 Midnight Commander fails. 3. Change the "PasswordAuthentication" option to "yes" and restart sshd and= try again, Midnight Commander can now access the host via SFTP. Kind regards. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-267819-7788>