In linux command line, when I connect to sftp or ssh this, it connects using my public keys and doesn't ask me for a password.

sftp user@host

It also works when I do

ssh user@host

But somehow when I do an SFTP link through MC, it keeps prompting me for a password.

Does MC not use the SSH public key to connect password-less? Or is there a way to manually allow MC to use the public key authentication?

  • Try to log out of your workstation and log in again. Maybe it is a ssh-agent problem.
    – ceving
    Mar 22, 2019 at 16:13
  • 1
    Use Shell link (sh://joe@somehost.ssh.edu:2222/private) instead of SFTP link. Jan 26, 2020 at 15:03

2 Answers 2


You have put the host in your ~/.ssh/config file:

Host your.host.name.or.ip
    User your.remote.username
    IdentityFile /path/to/your/keyfile

This one is easier...

ssh-add .ssh/id_rsa

Found here

Credit to El-ruso

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.