Bug 264375 - misc/far2l: unable to connect to FreeBSD sftp server using NetRocks plugin
Summary: misc/far2l: unable to connect to FreeBSD sftp server using NetRocks plugin
Status: Closed Not A Bug
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Alexey Dokuchaev
URL: https://github.com/elfmz/far2l/commit...
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-31 18:43 UTC by Serge Volkov
Modified: 2022-06-09 14:13 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (danfe)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Serge Volkov 2022-05-31 18:43:12 UTC
I have a default sftp server (sshd) started on the FreeBSD 12.3. And I can not connect to it with NetRocks in far2l. But I can successfully connect to the sftp server (openssh-server) started on the Ubuntu 20.04. I can't understand why is that? All default settings are used.
Comment 1 Alexey Dokuchaev freebsd_committer freebsd_triage 2022-06-01 07:45:29 UTC
(In reply to Serge Volkov from comment #0)
> I can't understand why is that? All default settings are used.
NetRocks plugin is using ssh_userauth_password() for authentication, while this authentication method is normally disabled on servers these days.  It should probably use the keyboard-interactive mode instead, but in the meantime, you can run the server with ``PasswordAuthentication yes'' option.
Comment 2 Serge Volkov 2022-06-01 08:06:04 UTC
The "PasswordAuthentication yes" option solved my problem. Thank you!
Comment 3 Alexey Dokuchaev freebsd_committer freebsd_triage 2022-06-01 08:08:44 UTC
Lame interactive login implementation had been added on April 10, 2022; we might consider merging the patch while we're waiting for the next release.
Comment 4 Serge Volkov 2022-06-01 08:37:28 UTC
It's a good news. I have been using FAR for many years. And I'm glad that now a fully functional far2l is available on FreeBSD.
Comment 5 commit-hook freebsd_committer freebsd_triage 2022-06-01 12:21:03 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=759140287ff7e7a18f4c9fbe5c922b75dc6bcc4c

commit 759140287ff7e7a18f4c9fbe5c922b75dc6bcc4c
Author:     Alexey Dokuchaev <danfe@FreeBSD.org>
AuthorDate: 2022-06-01 12:20:00 +0000
Commit:     Alexey Dokuchaev <danfe@FreeBSD.org>
CommitDate: 2022-06-01 12:20:00 +0000

    misc/far2l: backport keyboard-interactive authentication for SFTP

    Previously, NetRocks plugin would use ssh_userauth_password() for
    password-based authentication while this authentication method is
    normally disabled on servers these days.

    PR:     264375

 misc/far2l/Makefile | 3 ++-
 misc/far2l/distinfo | 2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)
Comment 6 Serge Volkov 2022-06-09 12:50:37 UTC
Unfortunately, after the update, the connection to SSH server with default settings still does not work. To establish a connection, I still have to set a parameter `PasswordAuthentication yes` in /etc/ssh/sshd_config.
Comment 7 Alexey Dokuchaev freebsd_committer freebsd_triage 2022-06-09 13:18:34 UTC
(In reply to Serge Volkov from comment #6)
> ... connection to SSH server with default settings still does not work.
Did you change Authentication to "Interactive login" in the Protocol options of the Site connection settings?
Comment 8 Serge Volkov 2022-06-09 13:28:59 UTC
After upgrade I don't have option `Interactive login`. In Login mode I still have only three options: `No password`, `Ask password`, `Saved password`.
Comment 9 Alexey Dokuchaev freebsd_committer freebsd_triage 2022-06-09 13:43:21 UTC
(In reply to Serge Volkov from comment #8)

*sigh* Not in the "Login mode", where did I mention Login mode?

║                    [ Protocol options ]                     ║
║            [ Save ] { Save/Connect } [ Cancel ]             ║
╚═════════════════════════════════════════════════════════════╝

Do you see Protocol options?  Click on it.  New dialog window will open.  The very first line is Authentication, this is where you specify "Interactive login".
Comment 10 Serge Volkov 2022-06-09 14:13:29 UTC
Oh yes, I found it. Now everything works. Thanks for the tip.