all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How to use ‘ssh -i <identity_file>’ with Tramp?
@ 2022-06-17 13:09 Pankaj Jangid
  2022-06-17 13:59 ` Leo Butler
  0 siblings, 1 reply; 6+ messages in thread
From: Pankaj Jangid @ 2022-06-17 13:09 UTC (permalink / raw)
  To: help-gnu-emacs

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





^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to use ‘ssh -i <identity_file>’ with Tramp?
  2022-06-17 13:09 How to use ‘ssh -i <identity_file>’ with Tramp? Pankaj Jangid
@ 2022-06-17 13:59 ` Leo Butler
  2022-06-17 14:10   ` Pankaj Jangid
  0 siblings, 1 reply; 6+ messages in thread
From: Leo Butler @ 2022-06-17 13:59 UTC (permalink / raw)
  To: Pankaj Jangid; +Cc: help-gnu-emacs@gnu.org

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to use ‘ssh -i <identity_file>’ with Tramp?
  2022-06-17 13:59 ` Leo Butler
@ 2022-06-17 14:10   ` Pankaj Jangid
  2022-06-17 17:58     ` Emanuel Berg
  0 siblings, 1 reply; 6+ messages in thread
From: Pankaj Jangid @ 2022-06-17 14:10 UTC (permalink / raw)
  To: help-gnu-emacs

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.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to use ‘ssh -i <identity_file>’ with Tramp?
  2022-06-17 14:10   ` Pankaj Jangid
@ 2022-06-17 17:58     ` Emanuel Berg
  2022-06-18  7:04       ` [changed_to] Had to fill quotes manually Pankaj Jangid
  0 siblings, 1 reply; 6+ messages in thread
From: Emanuel Berg @ 2022-06-17 17:58 UTC (permalink / raw)
  To: help-gnu-emacs

Pankaj Jangid 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?
>
> 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.

Meta: I hade to fill these quotes manually. Only your mails.
      What's up with the lines?

But to answer your question, see the use of -i here:

  https://dataswamp.org/~incal/emacs-init/tramp-incal.el

Actually it isn't that, that's sh(1) or dash on Debian which
isn't even secure.

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 6+ messages in thread

* [changed_to] Had to fill quotes manually
  2022-06-17 17:58     ` Emanuel Berg
@ 2022-06-18  7:04       ` Pankaj Jangid
  2022-06-21  4:02         ` Emanuel Berg
  0 siblings, 1 reply; 6+ messages in thread
From: Pankaj Jangid @ 2022-06-18  7:04 UTC (permalink / raw)
  To: help-gnu-emacs

Emanuel Berg <incal@dataswamp.org> writes:

>>>> 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?
>>
>> 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.
>
> Meta: I hade to fill these quotes manually. Only your mails.
>       What's up with the lines?

I have set fill-column to 47 in message
mode. Like this paragraph.

But to send posts in this mailing list, I just do ‘C-u 79 C-x f’ like
in this paragraph. Is this causing an issue.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [changed_to] Had to fill quotes manually
  2022-06-18  7:04       ` [changed_to] Had to fill quotes manually Pankaj Jangid
@ 2022-06-21  4:02         ` Emanuel Berg
  0 siblings, 0 replies; 6+ messages in thread
From: Emanuel Berg @ 2022-06-21  4:02 UTC (permalink / raw)
  To: help-gnu-emacs

Pankaj Jangid wrote:

>> I hade to fill these quotes manually. Only your mails.
>> What's up with the lines?
>
> I have set fill-column to 47 in message mode.
> Like this paragraph.
>
> But to send posts in this mailing list, I just do ‘C-u 79
> C-x f’ like in this paragraph. Is this causing an issue.

No, not this time, I think?

But actually it's not an issue re-filling them either. A lot
of people do that.

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-06-21  4:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-17 13:09 How to use ‘ssh -i <identity_file>’ with Tramp? Pankaj Jangid
2022-06-17 13:59 ` Leo Butler
2022-06-17 14:10   ` Pankaj Jangid
2022-06-17 17:58     ` Emanuel Berg
2022-06-18  7:04       ` [changed_to] Had to fill quotes manually Pankaj Jangid
2022-06-21  4:02         ` Emanuel Berg

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.