* TRAMP and scp
@ 2003-10-19 13:16 Michael Powe
2003-10-19 14:58 ` Kai Grossjohann
[not found] ` <mailman.1979.1066575685.21628.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 4+ messages in thread
From: Michael Powe @ 2003-10-19 13:16 UTC (permalink / raw)
i installed tramp and when i try to access a remote file, i get the
known error message
Out of band method `scp' not applicable for remote shell asking for
a password
i don't understand this. the default behavior is for scp to ask for
the ssh password to log in at the remote. scp works fine from the
command line. why is there an issue with this behavior here? if i
use ange-ftp, i get prompted for the password & that works fine.
aside from obvious security issues, i want to edit files on a server
that has only ssh access for logins, no ftp or telnet &c, and i'd
rather do it from here than in a terminal window.
i've seen some discussion of the error message which seems to imply
that it is a problem with scp. that doesn't make sense to me. it's
no more "interactive" than ftp with regard to entering a password.
can someone explain to me the difference?
thanks.
mp
--
cat: /home/powem/.signature: No such file or directory
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: TRAMP and scp
2003-10-19 13:16 TRAMP and scp Michael Powe
@ 2003-10-19 14:58 ` Kai Grossjohann
[not found] ` <mailman.1979.1066575685.21628.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 4+ messages in thread
From: Kai Grossjohann @ 2003-10-19 14:58 UTC (permalink / raw)
Michael Powe <michael+gnus@trollope.org> writes:
> Out of band method `scp' not applicable for remote shell asking for
> a password
It seems I failed to describe this correctly. Here is how Tramp
works:
When you invoke something that invokes Tramp, Tramp first opens a
shell connection to the remote host. This shell is used for filename
completion and suchlike. For this shell connection, Tramp knows how
to deal with password prompts.
If you are using an out-of-band method, then on actually transferring
a file, Tramp will open another connection to the remote host, using
scp in your example. For this connection, Tramp does NOT support
password prompts.
So an easy workaround is to choose an inline method, such as ssh. (It
will use uuencode or mimencode to transfer the file contents through
the shell connection.)
It would not be too difficult to support password prompts for scp
invocations. But then Tramp would ask you on every I/O operation,
such as C-x C-f or C-x C-s. Or autosave, for that matter!
So to make Tramp support scp password prompts in a meaningful manner,
it would have to cache the password. I was afraid of the security
issues involved, and so I wasn't so motivated to doing this. However,
if somebody else does it then I'll be happy to include that work.
(Modulo paperwork issues.)
Oh, one thought just pops into my mind: would it have helped if the
message had mentioned that you can use inline methods instead? I
could say `Use an inline method instead of the out-of-band method
`scp' because your remote shell asks for a password.' Would that have
helped?
--
Two cafe au lait please, but without milk.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: TRAMP and scp
[not found] ` <mailman.1979.1066575685.21628.help-gnu-emacs@gnu.org>
@ 2003-10-19 22:29 ` Michael Powe
2003-10-30 21:19 ` Kai Grossjohann
0 siblings, 1 reply; 4+ messages in thread
From: Michael Powe @ 2003-10-19 22:29 UTC (permalink / raw)
hello,
thanks for the extended reply.
>>>>> "Kai" == Kai Grossjohann <kai.grossjohann@gmx.net> writes:
Kai> Michael Powe <michael+gnus@trollope.org> writes:
>> Out of band method `scp' not applicable for remote shell asking
>> for a password
Kai> It seems I failed to describe this correctly. Here is how
Kai> Tramp works:
Kai> When you invoke something that invokes Tramp, Tramp first
Kai> opens a shell connection to the remote host. This shell is
Kai> used for filename completion and suchlike. For this shell
Kai> connection, Tramp knows how to deal with password prompts.
okay, so under what circumstances does this occur with scp, which i
believe is the default method if i don't use tramp-default-method?
Kai> If you are using an out-of-band method, then on actually
Kai> transferring a file, Tramp will open another connection to
Kai> the remote host, using scp in your example. For this
Kai> connection, Tramp does NOT support password prompts.
the message cited is the first message i get from attempting to open a
file remotely, so i don't actually get a prompt even for the opening
connection. that confuses me. from your description, it sounds like i
should get an initial password prompt and then the secondary attempt
to connect to the file (after opening the shell) should fail.
Kai> So an easy workaround is to choose an inline method, such as
Kai> ssh. (It will use uuencode or mimencode to transfer the file
Kai> contents through the shell connection.)
so, if i (setq default-tramp-method "ssh"), that performs the same
function? i shall try it forthwith.
Kai> It would not be too difficult to support password prompts for
Kai> scp invocations. But then Tramp would ask you on every I/O
Kai> operation, such as C-x C-f or C-x C-s. Or autosave, for that
Kai> matter!
Kai> So to make Tramp support scp password prompts in a meaningful
Kai> manner, it would have to cache the password. I was afraid of
Kai> the security issues involved, and so I wasn't so motivated to
Kai> doing this. However, if somebody else does it then I'll be
Kai> happy to include that work. (Modulo paperwork issues.)
Kai> Oh, one thought just pops into my mind: would it have helped
Kai> if the message had mentioned that you can use inline methods
Kai> instead? I could say `Use an inline method instead of the
Kai> out-of-band method `scp' because your remote shell asks for a
Kai> password.' Would that have helped?
i'm afraid i don't actually know the difference between "inline" and
"out-of-band" in this context, although your description here of what
is happening is clear.
thank you.
mp
--
cat: /home/powem/.signature: No such file or directory
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: TRAMP and scp
2003-10-19 22:29 ` Michael Powe
@ 2003-10-30 21:19 ` Kai Grossjohann
0 siblings, 0 replies; 4+ messages in thread
From: Kai Grossjohann @ 2003-10-30 21:19 UTC (permalink / raw)
Michael Powe <michael+gnus@trollope.org> writes:
> thanks for the extended reply.
I'm sorry for answering so late now, lots of todo items on my mind
now...
>>>>>> "Kai" == Kai Grossjohann <kai.grossjohann@gmx.net> writes:
>
> Kai> Michael Powe <michael+gnus@trollope.org> writes:
> >> Out of band method `scp' not applicable for remote shell asking
> >> for a password
>
> Kai> It seems I failed to describe this correctly. Here is how
> Kai> Tramp works:
>
> Kai> When you invoke something that invokes Tramp, Tramp first
> Kai> opens a shell connection to the remote host. This shell is
> Kai> used for filename completion and suchlike. For this shell
> Kai> connection, Tramp knows how to deal with password prompts.
>
> okay, so under what circumstances does this occur with scp, which i
> believe is the default method if i don't use tramp-default-method?
You can specify the method in the filename. For example, in Emacs you
can say C-x C-f /ssh:michael@otherhost:/some/file RET, then it will
use ssh. Or C-x C-f /su:root@localhost:/another/file RET -- this uses
the su program.
> Kai> If you are using an out-of-band method, then on actually
> Kai> transferring a file, Tramp will open another connection to
> Kai> the remote host, using scp in your example. For this
> Kai> connection, Tramp does NOT support password prompts.
>
> the message cited is the first message i get from attempting to open a
> file remotely, so i don't actually get a prompt even for the opening
> connection. that confuses me. from your description, it sounds like i
> should get an initial password prompt and then the secondary attempt
> to connect to the file (after opening the shell) should fail.
Well, Tramp is smart! It knows that things won't work, so it's
telling you up front. That way, you won't be disappointed.
> Kai> So an easy workaround is to choose an inline method, such as
> Kai> ssh. (It will use uuencode or mimencode to transfer the file
> Kai> contents through the shell connection.)
>
> so, if i (setq default-tramp-method "ssh"), that performs the same
> function? i shall try it forthwith.
Yes, I think it will.
In general, inline methods will be slower for large files and faster
for small files.
> i'm afraid i don't actually know the difference between "inline" and
> "out-of-band" in this context, although your description here of what
> is happening is clear.
Inline means that Tramp uses base64 or uu encoding to transfer the
file right through the shell connection. Out of band means that Tramp
starts another program, such as rcp or scp or rsync, to actually
transfer the file.
I knew about the different kinds of methods, and I had to find terms
to describe them. I'm afraid that maybe I've been using confusing
terms. Maybe I should have called them frumple and blargl methods...
(It just occurs to me that I think that the signal transmission folks
use "in-band" and "out-of-band", is this right? So maybe inline is
the confusing term here.)
Kai
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-10-30 21:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-19 13:16 TRAMP and scp Michael Powe
2003-10-19 14:58 ` Kai Grossjohann
[not found] ` <mailman.1979.1066575685.21628.help-gnu-emacs@gnu.org>
2003-10-19 22:29 ` Michael Powe
2003-10-30 21:19 ` Kai Grossjohann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).