To establish an ssh connection, I use the configuration file.;ssh remoteHost -F /home/alamd/ПакетыДоступа/root_91_211_249_142/config. Is it possible to transfer ssh connection settings from such a file to tramp? I found that it is possible to pass options through


, but it seems there is no option to transfer the configuration file. Thanks.

  • Access data for the host is taken from the database. No connection traces should remain in the file system. When using the configuration file, that flexibility is achieved when connecting.
    – uanr81
    Feb 3, 2020 at 12:09

1 Answer 1


If you mean to use this config file in Tramp instead of ~/.ssh/config, you need to tell Tramp so in tramp-methods. Something like

  (require 'tramp-sh)
  (let ((args (assoc 'tramp-login-args (assoc "ssh" tramp-methods))))
      (cdr args)
        '(("-F" "/home/alamd/ПакетыДоступа/root_91_211_249_142/config"))
        (cadr args)))))
  • Thanks, this is what I was looking for. It was not possible to use SSH certificates to open files on remote hosts in emacs. Glad your cooperation.
    – uanr81
    Feb 3, 2020 at 11:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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