all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* tramp default method
@ 2004-10-19 20:25 John Hunter
  2004-11-05 22:32 ` Kai Grossjohann
  0 siblings, 1 reply; 17+ messages in thread
From: John Hunter @ 2004-10-19 20:25 UTC (permalink / raw)



I am using tramp to acceess remote files over ssh/scp.  I have the
following in my .emacs (and nothing else)

    (setq load-path (cons (expand-file-name "~/emacs/lisp/tramp/lisp") load-path))
    (require 'tramp)
    (setq tramp-default-method "scp")

and if I examine the variable tramp-default-method with
describe-variable it is indeed "scp".

If I open a file with C-x C-f /server:somefile I get prompted for a
password (I have passwordless login enabled over ssh) and an get an
ftp failure with the following message in the *ftp user@sever* buffer

    ftp> open server
    ftp: connect: Connection refused

If I give the tramp method explicitly, with 

   C-x C-f /[scp/server]somefile

it works.

Any ideas?  I was under the impression that tramp would be invoked
merely with the C-x C-f /server:file syntax

JDH

GNU Emacs 21.2.1 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2002-04-29 on mother.paradise.lost
$Id: tramp.el,v 2.95 2002/04/10 17:16:25 kaig Exp $

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

* Re: tramp default method
  2004-10-19 20:25 John Hunter
@ 2004-11-05 22:32 ` Kai Grossjohann
  0 siblings, 0 replies; 17+ messages in thread
From: Kai Grossjohann @ 2004-11-05 22:32 UTC (permalink / raw)


John Hunter <jdhunter@ace.bsd.uchicago.edu> writes:

> GNU Emacs 21.2.1 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2002-04-29 on mother.paradise.lost
> $Id: tramp.el,v 2.95 2002/04/10 17:16:25 kaig Exp $

I think this is the last version on SourceForge, but Tramp has now
moved to Savannah.

http://savannah.gnu.org/projects/tramp

Kai

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

* tramp default method
@ 2006-05-25 19:38 VR
       [not found] ` <nqac94lwh9.fsf@alcatel.de>
  0 siblings, 1 reply; 17+ messages in thread
From: VR @ 2006-05-25 19:38 UTC (permalink / raw)


I am trying to use tramp for editing a file on a remote machine. It
always tries to go though ftp. I tried changing it to scp adding this
line in my custom.el

(setq tramp-default-method "scp")


but still no luck. 

Any suggestions?

Thanks
VR

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

* Re: tramp default method
       [not found] ` <nqac94lwh9.fsf@alcatel.de>
@ 2006-05-26 18:59   ` VR
  0 siblings, 0 replies; 17+ messages in thread
From: VR @ 2006-05-26 18:59 UTC (permalink / raw)



>> I am trying to use tramp for editing a file on a remote machine. It
>> always tries to go though ftp. I tried changing it to scp adding this
>> line in my custom.el

>> (setq tramp-default-method "scp")


>Tramp's default method is "ssh" (or "plink" under MS Windows); so it
>is mysterious if it always takes "ftp". Are you sure Tramp is loaded?
>What is the output of "C-h v file-name-handler-alist" or "C-h v
>tramp-version"?

Yeah, so I thought. C-h v file-name-handler-alist gives:
`file-name-handler-alist' is a simple built-in variable.

Value: (("\\`/\\[.*\\]" . tramp-file-name-handler) ("^/[^/:]+:" .
remote-path-file-handler-function))


I can't seem to have the variable tramp-version in. I assume Tramp is
loaded, I get all sorts of tramp variables, but not everything, like
the one you just mentioned. Confused...

Thanks,
VR

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

* Tramp default method
@ 2006-10-29 13:18 Lars Hansen
  2006-11-05 17:06 ` Michael Albinus
  0 siblings, 1 reply; 17+ messages in thread
From: Lars Hansen @ 2006-10-29 13:18 UTC (permalink / raw)
  Cc: emacs-devel

How come tramp-default-method is ssh and not scp?
In my setup, copying a 8 MB file takes 100 secs with ssh and 1.5 secs
withs scp. And I beleive scp should be installed if ssh is.

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

* Re: Tramp default method
  2006-11-05 17:06 ` Michael Albinus
@ 2006-11-05 16:52   ` Andreas Schwab
  2006-11-05 19:34     ` Michael Albinus
  2006-11-06  5:01   ` Richard Stallman
  2006-11-06 14:47   ` Lars Hansen
  2 siblings, 1 reply; 17+ messages in thread
From: Andreas Schwab @ 2006-11-05 16:52 UTC (permalink / raw)
  Cc: emacs-devel

Michael Albinus <michael.albinus@gmx.de> writes:

> With smaller files, ssh seems to be faster than scp. scp needs always
> an additional process, which requires some initial handshaking.

That can be avoided by setting up a master connection where all ssh data
is routed through.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

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

* Re: Tramp default method
  2006-10-29 13:18 Tramp default method Lars Hansen
@ 2006-11-05 17:06 ` Michael Albinus
  2006-11-05 16:52   ` Andreas Schwab
                     ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Michael Albinus @ 2006-11-05 17:06 UTC (permalink / raw)
  Cc: emacs-devel

Lars Hansen <lists@soem.dk> writes:

> How come tramp-default-method is ssh and not scp?
> In my setup, copying a 8 MB file takes 100 secs with ssh and 1.5 secs
> withs scp. And I beleive scp should be installed if ssh is.

With smaller files, ssh seems to be faster than scp. scp needs always
an additional process, which requires some initial handshaking. See
the discussion in the Tramp info page "(tramp)Default Method".

Best regards, Michael.

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

* Re: Tramp default method
  2006-11-05 16:52   ` Andreas Schwab
@ 2006-11-05 19:34     ` Michael Albinus
  2006-11-05 20:34       ` Andreas Schwab
  0 siblings, 1 reply; 17+ messages in thread
From: Michael Albinus @ 2006-11-05 19:34 UTC (permalink / raw)
  Cc: emacs-devel

Andreas Schwab <schwab@suse.de> writes:

>> With smaller files, ssh seems to be faster than scp. scp needs always
>> an additional process, which requires some initial handshaking.
>
> That can be avoided by setting up a master connection where all ssh data
> is routed through.

IIUC, you mean an ssh connection to the remote host, and afterwards
scp from the remote host back to the local host?

How does this work if there is no ssh daemon running on the local
host? And how does this work when you need multiple hops in order to
reach the remote host, passing a firewall or whatever?

> Andreas.

Best regards, Michael.

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

* Re: Tramp default method
  2006-11-05 19:34     ` Michael Albinus
@ 2006-11-05 20:34       ` Andreas Schwab
  2006-11-05 20:53         ` Michael Albinus
  0 siblings, 1 reply; 17+ messages in thread
From: Andreas Schwab @ 2006-11-05 20:34 UTC (permalink / raw)
  Cc: emacs-devel

Michael Albinus <michael.albinus@gmx.de> writes:

> Andreas Schwab <schwab@suse.de> writes:
>
>>> With smaller files, ssh seems to be faster than scp. scp needs always
>>> an additional process, which requires some initial handshaking.
>>
>> That can be avoided by setting up a master connection where all ssh data
>> is routed through.
>
> IIUC, you mean an ssh connection to the remote host, and afterwards
> scp from the remote host back to the local host?

No.  Open an ssh connection as the ControlMaster, then use ssh/scp as
usual.  See ssh_config(5).

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

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

* Re: Tramp default method
  2006-11-05 20:34       ` Andreas Schwab
@ 2006-11-05 20:53         ` Michael Albinus
  0 siblings, 0 replies; 17+ messages in thread
From: Michael Albinus @ 2006-11-05 20:53 UTC (permalink / raw)
  Cc: emacs-devel

Andreas Schwab <schwab@suse.de> writes:

>> IIUC, you mean an ssh connection to the remote host, and afterwards
>> scp from the remote host back to the local host?
>
> No.  Open an ssh connection as the ControlMaster, then use ssh/scp as
> usual.  See ssh_config(5).

I see. I'll play with this option, looks promising.

> Andreas.

Thanks to nudge me, and best regards, Michael.

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

* Re: Tramp default method
  2006-11-05 17:06 ` Michael Albinus
  2006-11-05 16:52   ` Andreas Schwab
@ 2006-11-06  5:01   ` Richard Stallman
  2006-11-06 14:52     ` Lars Hansen
  2006-11-06 22:31     ` Michael Albinus
  2006-11-06 14:47   ` Lars Hansen
  2 siblings, 2 replies; 17+ messages in thread
From: Richard Stallman @ 2006-11-06  5:01 UTC (permalink / raw)
  Cc: emacs-devel

    > How come tramp-default-method is ssh and not scp?
    > In my setup, copying a 8 MB file takes 100 secs with ssh and 1.5 secs
    > withs scp. And I beleive scp should be installed if ssh is.

    With smaller files, ssh seems to be faster than scp. scp needs always
    an additional process, which requires some initial handshaking. See
    the discussion in the Tramp info page "(tramp)Default Method".

So how about making the default be "ssh for a file under 10k, scp for
larger files"?

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

* Re: Tramp default method
  2006-11-05 17:06 ` Michael Albinus
  2006-11-05 16:52   ` Andreas Schwab
  2006-11-06  5:01   ` Richard Stallman
@ 2006-11-06 14:47   ` Lars Hansen
  2 siblings, 0 replies; 17+ messages in thread
From: Lars Hansen @ 2006-11-06 14:47 UTC (permalink / raw)
  Cc: Richard Stallman, emacs-devel

Michael Albinus wrote:

>With smaller files, ssh seems to be faster than scp. scp needs always
>an additional process, which requires some initial handshaking. See
>the discussion in the Tramp info page "(tramp)Default Method".
>  
>
IMO, the default value of tramp-default-method should give good results
for large as well as small files. I don't think a small improvement for
small files justify a very bad performance for large files. And even
though people don't normally _edit_ large files, the do _copy_ them
using dired (at least I do). Emacs is much more than an editor, you know :-)

To make it short: An unexperienced user should get good performance for
small and large files. Experienced users that never edit or copy large
files can easily customize tramp-default-method. IMHO.

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

* Re: Tramp default method
  2006-11-06  5:01   ` Richard Stallman
@ 2006-11-06 14:52     ` Lars Hansen
  2006-11-06 21:00       ` Richard Stallman
  2006-11-06 22:33       ` Michael Albinus
  2006-11-06 22:31     ` Michael Albinus
  1 sibling, 2 replies; 17+ messages in thread
From: Lars Hansen @ 2006-11-06 14:52 UTC (permalink / raw)
  Cc: Michael Albinus, emacs-devel

Richard Stallman wrote:

>So how about making the default be "ssh for a file under 10k, scp for
>larger files"?
>  
>
Checking the file size before copying is an extra overhead when the file
is remote.

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

* Re: Tramp default method
  2006-11-06 14:52     ` Lars Hansen
@ 2006-11-06 21:00       ` Richard Stallman
  2006-11-06 22:45         ` Michael Albinus
  2006-11-06 22:33       ` Michael Albinus
  1 sibling, 1 reply; 17+ messages in thread
From: Richard Stallman @ 2006-11-06 21:00 UTC (permalink / raw)
  Cc: michael.albinus, emacs-devel

    Checking the file size before copying is an extra overhead when the file
    is remote.

Alas, that is true when reading the file.  However, when saving the file,
you can check the size painlessly.

For reading the file, perhaps the openssh developers could
perhaps provide a mode that does things one way or the other
depending on the file size.  But that is not something we can do now.

For the short term, I think we should use scp as the default.
To eliminate a short delay for small files is not worth a painful
slowdown for large files.

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

* Re: Tramp default method
  2006-11-06  5:01   ` Richard Stallman
  2006-11-06 14:52     ` Lars Hansen
@ 2006-11-06 22:31     ` Michael Albinus
  1 sibling, 0 replies; 17+ messages in thread
From: Michael Albinus @ 2006-11-06 22:31 UTC (permalink / raw)
  Cc: emacs-devel

Richard Stallman <rms@gnu.org> writes:

> So how about making the default be "ssh for a file under 10k, scp for
> larger files"?

That is already on the todo list for Tramp 2.1.

Best regards, Michael.

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

* Re: Tramp default method
  2006-11-06 14:52     ` Lars Hansen
  2006-11-06 21:00       ` Richard Stallman
@ 2006-11-06 22:33       ` Michael Albinus
  1 sibling, 0 replies; 17+ messages in thread
From: Michael Albinus @ 2006-11-06 22:33 UTC (permalink / raw)
  Cc: rms, emacs-devel

Lars Hansen <lists@soem.dk> writes:

> Richard Stallman wrote:
>
>>So how about making the default be "ssh for a file under 10k, scp for
>>larger files"?
>>  
>>
> Checking the file size before copying is an extra overhead when the file
> is remote.

Nope. Usually, file-attributes is called before copying a file, the
size is known therefore. And Tramp 2.1 caches/reuses such information
whenever possible.

Best regards, Michael.

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

* Re: Tramp default method
  2006-11-06 21:00       ` Richard Stallman
@ 2006-11-06 22:45         ` Michael Albinus
  0 siblings, 0 replies; 17+ messages in thread
From: Michael Albinus @ 2006-11-06 22:45 UTC (permalink / raw)
  Cc: emacs-devel

Richard Stallman <rms@gnu.org> writes:

> For reading the file, perhaps the openssh developers could
> perhaps provide a mode that does things one way or the other
> depending on the file size.  But that is not something we can do now.

Tramp's scp method is always escorted by an ordinary ssh connection in
order to gather file information. That is sufficient for today. When
Andreas' suggestion is added (use of ControlMaster), scp might be even
more efficient.

An extension of ssh is nothing I expect for next time. What could be
helpful is an own small server process on the remote side (via an ssh
connection), which provides the needed file information directly to
Tramp. The FISH server is such an approach, I'm playing with these
days. But I'm still not happy with performance.

> For the short term, I think we should use scp as the default.
> To eliminate a short delay for small files is not worth a painful
> slowdown for large files.

OK, I'll change the default.

Best regards, Michael.

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

end of thread, other threads:[~2006-11-06 22:45 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-29 13:18 Tramp default method Lars Hansen
2006-11-05 17:06 ` Michael Albinus
2006-11-05 16:52   ` Andreas Schwab
2006-11-05 19:34     ` Michael Albinus
2006-11-05 20:34       ` Andreas Schwab
2006-11-05 20:53         ` Michael Albinus
2006-11-06  5:01   ` Richard Stallman
2006-11-06 14:52     ` Lars Hansen
2006-11-06 21:00       ` Richard Stallman
2006-11-06 22:45         ` Michael Albinus
2006-11-06 22:33       ` Michael Albinus
2006-11-06 22:31     ` Michael Albinus
2006-11-06 14:47   ` Lars Hansen
  -- strict thread matches above, loose matches on Subject: below --
2006-05-25 19:38 tramp " VR
     [not found] ` <nqac94lwh9.fsf@alcatel.de>
2006-05-26 18:59   ` VR
2004-10-19 20:25 John Hunter
2004-11-05 22:32 ` Kai Grossjohann

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.