7

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.

Question

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

pch
  • 241
  • 2
  • 6

1 Answers1

6

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.

pch
  • 241
  • 2
  • 6