Re: Bug report : MC freezes reproducable when requesting SSH password for Fish VFS

Hello, Hans!

> I experienced the following problem with MC, console edition, different
> versions (see below) on Linux :
> When using the Fish virtual file system by connecting to a server running
> SSH, entering the virtual directory
> 	cd /#sh:user host ,
> SSH requests the user`s password when RSA (or other method) authentication
> fails.

Unfortunately, ssh insists on reading passwords from /dev/tty, which makes
it quite hard for MC to feed the password to ssh.  If you look into
fish.c, you would find that MC is supposed to show you an error message

"Sorry, we can not do password authenticated connections for now."

I understand from you description that it doesn't work this way for you.

If you have a hacked ssh that supports the "-I" option (read from stdin),
you can define HAVE_HACKED_SSH and then MC is supposed to ask yuo the
password and feed it to ssh through stdin.

This doesn't seem to be documented anywhere outside the source.
I believe, this functionality can be improved.  In the meantime, fish
can only be used over ssh connections that don't require a password.

> This password request freezes MC after displaying the "Waiting for an initial
> line..." message, messing up the console output (sometimes the request
> appears on top of the screen, sometimes at the bottom). MC does not accept
> any more input and has to be forcely killed.

That's clearly a bug.

> Trying the FTP VFS instead results in a "regular" console graphics password
> window.

MC uses its own FTP client implementation.  It doesn't run a separate
program and therefore has no problems interacting with it.

> Fish works fine if SSH can authenticate the user using RSA, but that could be
> sometimes (e.g. in my case) not the desired authentication method.

It should also be possible to hack ssh to read stdin if "-I" is specified.
I don't know if there are any patches available.

> so I suppose it is a MC bug and not consequence of misconfiguration.

Correct.  I must add that apart from the bug (not showing the warning)
there is a missing feature (inability to feed the password to ssh).

> A fix would be highly welcome, as I consider the MC Fish VFS as a _very_
> interesting alternative to scp, sftp or ftp tunneling.

I agree with you.  Fixes to the existing code are welcome, much more than
new half-implemented features.

Pavel Roskin

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]