FiSH Connection fails : mc freezing

Pavel Roskin proski at gnu.org
Sun Oct 7 08:44:49 UTC 2001


Hi, Pavel!

> > I cannot connect with mc to any host using the fish virtual file system over
> > ssh, as mc freezes when requesting the users password.
>
> fish does not suuport password auth because ssh always reads passwd from /ddev/tty.
> Fixssh to acceptt passwd from stdin, and we an fix mc.

Actually, there is a good reason why ssh uses /dev/tty.  The standard
channels (stdout, stdin, stderr) are connected to the remote program and
should be completely independent from the authentication.  At least the
recent versions of OpenSSH do it this way.  You can do this:

ssh prog <infile >outfile 2>errfile

and you will be prompted for password on /dev/tty and will be able to
enter it, yet the program will work as if it were local, i.e. no extra
data will appear in infile, outfile and errfile.

It is possible to control /dev/tty of ssh if it's run in a pseudoterminal,
similar to how MC runs the subshell.  Still it will require that mc
interprets the output of ssh somehow.  Maybe MC could capture all output
until ssh runs the fish server _or_ asks for the password/passphrase, but
I envision problems with making it secure and reliable.

Another solution would be to hide the panels and run ssh on the same tty
as MC.  The panels would be restored when the remote fish server answers.
This would not be pretty, but it would completely eliminate the need to
redirect /dev/tty and capture/feed anything.

-- 
Regards,
Pavel Roskin





More information about the mc mailing list