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: Pankaj Jangid
Subject: Re: How to use ‘ssh -i <identity_file>’ with Tramp?
Date: Fri, 17 Jun 2022 19:40:23 +0530
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Leo Butler <Leo.Butler@umanitoba.ca> writes:

> 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

Thanks. This works. And I found another option also. Use ssh-add to add the
IdentityFile to ssh’s own store. And then use ssh as usual.




reply via email to

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