midnight commander and ssh sftp

Bob bob at a1poweruser.com
Fri Feb 17 09:38:44 PST 2006



> Is there some way to be able to use midnight
commander through a SSH
> tunnel?

1) Use scp/sftp: it's called "Shell link..." is mc menu
(the problem is
Password: prompt is displayed somewhere on the mc
command line as it seems to
be unable to parse it for some reason. So when see it,
simply enter the
password there & refresh the mc panels w/ C-O,C-O)

2) More general solution: if u run 6.0 use
sysutils/fusefs-sshfs
(http://www.freebsd.org/cgi/cvsweb.cgi/ports/sysutils/f
usefs-sshfs/),
it provides an scp/sftp link within filesystem layer,
so you can use it not
only from mc but from any app. The problem it seems to
be much slower than
plain scp (though uses the same transport), dunno why

--
Regards, Mirya
ICQ #313898202



-----Original Message-----
From: owner-freebsd-questions at freebsd.org
[mailto:owner-freebsd-questions at freebsd.org]On Behalf
Of Kyryll A
Mirnenko aka Mirya
Sent: Thursday, February 16, 2006 1:53 PM
To: freebsd-questions at freebsd.org;
fbsd_user at a1poweruser.com
Subject: Re: midnight commander and ssh sftp


Mirya;

After spending some time playing around with MC,
I finally figured out the meaning of your post.

When you said MC menu I took that to mean the F2 (ie:
function 2 key)
which is displayed at the bottom of the MC panel.

What you really meant was the F9 pull down function
from the bottom
of the MC panel which activates the menu
"Left file command options right" at the top of the MC
panel.

The left & right pull down menu option do have the
FTP link & SH link option you talked about.

Selecting the SH link opens a window where I entered
/#sh:[user at remote Host]
then clicking on OK button lanched an SSH login.

Also entering cd /#sh:[user at remote Host] on the MC
command
line does the same thing.

MC returns to it's 2 up panel and the MC command lines
at the
bottom of the panel asks for the SSH pass phrase.
After entering the pass phrase I do get the remote
hosts
directory tree displayed with a heading of the /#sh:
command used to launched it.

This all behaves the same way as native FTP using MC.
But after entering the pass phrase the MC command line
does not clear at all and ends up containing some left
over SSH message.

Holding down the CTL key while pressing the keyboard
letter C and O at the same time 2 times in a role does
clear the MC command line like you said.

When completed doing SSH sftp through MC I termate the
MC SSH session with the remote host by hitting F10 key.

For testing, I changes my firewall rules on port 22 to
log
all packets to verify that MC was really initating a
SSH
session with the host.

The host log records did verify that MC did indeed
initate a SSH session with the host.

This is exastily what I wanted to do.

Now I have an Freebsd command line launched GUI for
sftp
SSHing into the remote host system.

Thanks for the pointer that got me started
looking in the correct direction.















More information about the freebsd-questions mailing list