[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 15:37:04 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Manuel Giraud <> writes:

Hi Manuel,

>> 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.
> I've made the same test : scp hostA:/path/to/file hostB:/another/path
> and with a relatively large file (1.5 GB) and it works as expected
> without filling /tmp. I'm using scp on fairly recent openbsd machine.
> OTOH, the out-of-band method of tramp fills up my /tmp (which is only
> 256 MB). So maybe, having tramp out-of-band trying to "scp hostA:old
> hostB:new" before relying on other method could be enough without going
> to the trouble of out-of-band from hostA to hostB directly?

Likely, you're using an older scp version. This behavior has changed in
OpenSSH 8.7, see <>:

--8<---------------cut here---------------start------------->8---
 * scp(1): this release changes the behaviour of remote to remote
   copies (e.g. "scp host-a:/path host-b:") to transfer through the
   local host by default. This was previously available via the -3
   flag. This mode avoids the need to expose credentials on the
   origin hop, avoids triplicate interpretation of filenames by the
   shell (by the local system, the copy origin and the destination)
   and, in conjunction with the SFTP support for scp(1) mentioned
   below, allows use of all authentication methods to the remote
   hosts (previously, only non-interactive methods could be used).
   A -R flag has been added to select the old behaviour.
--8<---------------cut here---------------end--------------->8---

So Tramp needs even more checks in order to detect what scp supports.

Best regards, Michael.

reply via email to

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