all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* tramp multi hop ssh, and shell
@ 2019-12-19 10:17 Joao Cortes
  2019-12-19 20:32 ` Michael Albinus
  2019-12-19 20:49 ` jonetsu
  0 siblings, 2 replies; 3+ messages in thread
From: Joao Cortes @ 2019-12-19 10:17 UTC (permalink / raw)
  To: help-gnu-emacs@gnu.org


When hoping about an ssh gateway, 'tramp' performs a new connection each
time I call 'compile'.

For instance, If I do

C-x C-f /ssh:me@taurus|/ssh:me@aries:,

'tramp' correctly connects me to aries, asking for authentication for
both machines.  However, If I run 'compile' , or open a new shell with
'shell' while in an aries directory, Tramp reconnects to aries , asking
for authentication again and again.

If I do not hop about taurus, doing something like,

C-x C-f /ssh:me@aries,

running 'compile' does not cause a reconnection.

Can any one confirm this behaviour? If so, is this intendend?

Does anyone know how to make emacs treat a multi hop like a non hoping
connection?

Thanks



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

* Re: tramp multi hop ssh, and shell
  2019-12-19 10:17 tramp multi hop ssh, and shell Joao Cortes
@ 2019-12-19 20:32 ` Michael Albinus
  2019-12-19 20:49 ` jonetsu
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Albinus @ 2019-12-19 20:32 UTC (permalink / raw)
  To: Joao Cortes; +Cc: help-gnu-emacs@gnu.org

Joao Cortes <joaooneillcortes@outlook.pt> writes:

Hi Joao,

> When hoping about an ssh gateway, 'tramp' performs a new connection each
> time I call 'compile'.
>
> For instance, If I do
>
> C-x C-f /ssh:me@taurus|/ssh:me@aries:,

I guess you mean /ssh:me@taurus|ssh:me@aries:

> 'tramp' correctly connects me to aries, asking for authentication for
> both machines.  However, If I run 'compile' , or open a new shell with
> 'shell' while in an aries directory, Tramp reconnects to aries , asking
> for authentication again and again.
>
> If I do not hop about taurus, doing something like,
>
> C-x C-f /ssh:me@aries,
>
> running 'compile' does not cause a reconnection.

`compile' calls `start-file-process-shell-command', which runs a new
process. How do you believe, Tramp does not "cause a reconnection"?

> Can any one confirm this behaviour? If so, is this intendend?
>
> Does anyone know how to make emacs treat a multi hop like a non hoping
> connection?

What could happen is that Tramp does not remember the already provided
passwords in case of multihops. Could you pls confirm that you mean this
scenario?

> Thanks

Best regards, Michael.



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

* Re: tramp multi hop ssh, and shell
  2019-12-19 10:17 tramp multi hop ssh, and shell Joao Cortes
  2019-12-19 20:32 ` Michael Albinus
@ 2019-12-19 20:49 ` jonetsu
  1 sibling, 0 replies; 3+ messages in thread
From: jonetsu @ 2019-12-19 20:49 UTC (permalink / raw)
  To: help-gnu-emacs

On Thu, 19 Dec 2019 10:17:51 +0000
Joao Cortes <joaooneillcortes@outlook.pt> wrote:

> When hoping about an ssh gateway, 'tramp' performs a new connection
> each time I call 'compile'.

If before doing any of that you cd to the machine ?  Eg:

M-x cd
sshx:user@machine

Then perhaps open a dired C-x d.  Pick a .c file or anything, then run
M-x compile.

'compile' will take for granted the cd 'directory'.  At least it does
here, and doe snot ask again for a password.

Hope this helps.



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

end of thread, other threads:[~2019-12-19 20:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-19 10:17 tramp multi hop ssh, and shell Joao Cortes
2019-12-19 20:32 ` Michael Albinus
2019-12-19 20:49 ` jonetsu

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.