help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to use ‘ssh -i <identity_file>’ with Tramp?


From: Leo Butler
Subject: Re: How to use ‘ssh -i <identity_file>’ with Tramp?
Date: Fri, 17 Jun 2022 13:59:12 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

On Fri, Jun 17 2022, Pankaj Jangid <pankaj@codeisgreat.org> wrote:

> When I edit remote files using ssh with default options, it works fine. But 
> now
> there is a requirement to use an identity_file with option -i. How to add this
> option when connecting using Tramp?
>
> On command line I connect using this command,
>
> ssh -i <identity_file> user@host

I would create ~/.ssh/config and populate it with your command-line
options:

#+begin_example
Host ssh-example-com
     HostName           ssh.example.com
     User               someone
     Port               4321
     IdentityFile       ~/.ssh/ssh.example.com
#+end_example

Then,

ssh ssh-example-com

will do what you want. Or

C-x C-f /ssh:ssh-example-com:. RET

will open the home directory of "someone" on ssh.example.com.

HTH,
Leo


reply via email to

[Prev in Thread] Current Thread [Next in Thread]