5

Problem description

I try to connect to remote server in one of two panels of Midnight Commander using SFTP link... submenu. Unfortunately, mc does not pass my ~/.ssh/config file to sftp. Therefore typing sftp://myhostalias results in error message

Cannot chdir to "/sftp://myhostalias"

Here is a content of ~/.ssh/config:

Host myhostalias
    HostName server.url.domain
    User myusername
    IdentityFile ~/.ssh/id_rsa-myhostalias

Please, note the following:

  • sftp://myusername@server.url.domain works fine followed by inputting my password. I guess, this should not work if password authentication is disabled.
  • sftp myhostalias from terminal also works fine.

Question

What way should I connect to the remote server from mc SFTP link... menu using the aliases from my current ssh config?

2
  • 2
    What is the question? Dec 12, 2017 at 11:04
  • Write a patch against mc or ask one of the developers with this feature request. Dec 12, 2017 at 11:25

1 Answer 1

4

One should use Shell link... submenu instead of SFTP link... one. Type something like this in the address field: sh://myhostalias/~ or simply myhostalias (see ssh_config example above).

Concerning SFTP link..., I didn't manage to use it that way from mc gui. Anyway, using aliases with sftp in CLI is straightforward.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.