[Top][All Lists]

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

Re: Dired command on same host

From: Michael Albinus
Subject: Re: Dired command on same host
Date: Wed, 05 Jan 2022 11:34:40 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Tassilo Horn <> writes:

Hi Tassilo,

>>> I have in my init a (simple) function that does this out-of-band scp
>>> but I think that the most tricky parts (for something general pupose)
>>> are:
>>>     - how host A understand host B name?
>>>     - is host B reachable from host A?
>> Must be checked, yes. But this isn't a problem for Tramp. It keeps
>> shell sessions on both host A and host B, a simple "ssh -q -o
>> ConnectTimeout=1 B exit 2>/dev/null" on host A would tell us whether
>> host B is reachable
> Sorry if that question just illustrates that I don't know how Tramp
> works but: is it ensured that the host B on A is the same as B on my
> local machine?  Like I could have different hosts defined as B in my
> local /etc/hosts and the one on A.

Indeed, this is not guaranteed. So it doesn't make sense to run this
check on host B.

I've just applied some tests. If I run "scp hostA:/path/to/file
hostB:/another/path", scp assumes the "-3" argument by default. That
means, it copies the file first from hostA to my local host, and copies
then from my local host to hostB - like Tramp does. The difference is,
that it keeps the local transfer file in /tmp.

In order to force scp to copy directly, it needs the "-R" argument for
scp. Another restriction is, that connection from hostA to hostB must be
possible in batch mode, w/o interactive authentication.

This tells us, that we shall support direct copy between two remote
machines in Tramp as opt-in, via a user option to be configured. And the
user would be responsible that the restrictions (hostB is the same
everywhere, connection from hostA to hostB possible in batch mode) are

> Bye,
> Tassilo

Best regards, Michael.

reply via email to

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