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://[email protected] 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.


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


1 Answer 1


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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .