tramp with 'plink -pw'
Bill Pringlemeir <[EMAIL PROTECTED]> 28 Feb 2001 13:43:25 >> However, you can use the "-pw secret" option to allow plink to >> connect. This worked on my NTEmacs 20.7.3. [EMAIL PROTECTED] Wed, 28 Feb 2001 16:30:10 -0500 > And for me on GNU Emacs 20.7.1 (i386-*-nt5.0.2195). I.e. in GNU Emacs 20.7.1 on win2k with (I believe) cmdproxy, I can do M-x shell and enter > plink -ssh -v -pw password [EMAIL PROTECTED] and connect, and interact. However, with tramp-1.449 and > (setq tramp-methods > (append > (list > '("t" > ; (tramp-connection-function tramp-open-connection-rsh) > (tramp-connection-function HACKED-tramp-open-connection-rsh) > (tramp-rsh-program "plink") > (tramp-rcp-program "pscp") > (tramp-remote-sh"/bin/sh") > (tramp-rsh-args > ("-v" >"-pw password" >"-ssh")) > (tramp-rcp-keep-date-arg"-p") > (tramp-su-program nil) > (tramp-su-args nil) > (tramp-encoding-command nil) > (tramp-decoding-command nil) > (tramp-encoding-functionnil) > (tramp-decoding-functionnil) > (tramp-telnet-program nil)) > ) > tramp-methods) > ) ; end (setq tramp-methods in my _emacs, when I do M-x find-file /r@t:[EMAIL PROTECTED]:.emacs it still fails to connect, with the same *tramp* and *Backtrace* buffer contents. Any suggestions on how to fix this? One thing I'm wondering: since the error is *Backtrace* > Signaling: (error "Couldn't find remote shell or passwd prompt") is there a problem with my shell-prompt-pattern? It's currently set to > (setq shell-prompt-pattern "^[^#$%>\n]*[#$>] *") The servers to which I'm trying to connect default to tcsh, and return stuff like (copied from *shell*, broken for mail at '..') > +-- .. -+ > | By accessing this machine, it .. med that you have read and agree | > | with the dialup usage policy .. | > | http://www.ncsu.edu/polic .. .html [Last Updated 11/10/00] | > | If you have not read the abov .. se do so immediately.| > |- SIGNIFICANT CHANGES IN POLIC .. WEB BROWSERS RUN FROM DIALUPS | > | HAVE BEEN MADE. ..--| > +-- .. -+ > | For the latest Eos/Unity news .. on reporting system problems and | > | getting help with the system, .. s'. For the Eos/Unity usage | > | policy, type 'policy'... | > +-- .. -+ > | Be sure to change your passwo .. ce a semester. Choose a password | > | with a mix of upper and lower .. s, numbers, or other special | > | characters. Password changes .. effect for up to 30 minutes | > | after requesting the change. .. | > +-- .. -+ > You have 109 messages (590062 bytes) on uni00map.unity.ncsu.edu > Volume Name Quota Used %Used Partition > users.t.tlroche 5 33939 68% 58% > 7[r[999;999H[6nresize: Time out occurred Note that this times out after about 10 seconds. > Running user customized standard startup activities ... > End of login--close console. > [1m/ncsu/tlroche> [m Also: could someone tell me where/with what variable the shell program is set? I don't see anything in apropos. I'm assuming mine is cmdproxy, because when I do M-x shell, I see > Microsoft Windows 2000 [Version 5.00.2195] > (C) Copyright 1985-2000 Microsoft Corp. > h:\> TIA, [EMAIL PROTECTED]
Re: tramp with 'plink -pw'
On Wed, 28 Feb 2001, Tom Roche wrote: > Bill Pringlemeir <[EMAIL PROTECTED]> 28 Feb 2001 13:43:25 >>> However, you can use the "-pw secret" option to allow plink to >>> connect. This worked on my NTEmacs 20.7.3. > > [EMAIL PROTECTED] Wed, 28 Feb 2001 16:30:10 -0500 >> And for me on GNU Emacs 20.7.1 (i386-*-nt5.0.2195). > > I.e. in GNU Emacs 20.7.1 on win2k with (I believe) cmdproxy, I can do > M-x shell and enter > >> plink -ssh -v -pw password [EMAIL PROTECTED] > > and connect, and interact. However, with tramp-1.449 and > [...] > > in my _emacs, when I do > > M-x find-file /r@t:[EMAIL PROTECTED]:.emacs > > it still fails to connect, with the same *tramp* and *Backtrace* > buffer contents. Any suggestions on how to fix this? Hack your profile on the remote machine to *not* spit out ANSI/VT100 when TERM is DUMB. :) > One thing I'm wondering: since the error is > > *Backtrace* >> Signaling: (error "Couldn't find remote shell or passwd prompt") > > is there a problem with my shell-prompt-pattern? It's currently set to > >> (setq shell-prompt-pattern "^[^#$%>\n]*[#$>] *") Yeah, that fails to match: [...] >> Running user customized standard startup activities ... >> End of login--close console. >> [1m/ncsu/tlroche> [m Because of the trailing escape sequence "[m". The right fix, as I said above, is to have the silly tcsh on the remote machine *not* automatically try to underline your command prompt. Probably by setting PS1 in the login script. The wrong fix, but one that makes life for you easier, is to hack the regexp in `shell-prompt-pattern' to match the escape sequences as well: (setq shell-prompt-pattern "^\\(\e[1m\\)?[^#$%>\n]*[#$>] *\\(\e[m\\)?") You can even make the escape sequence matching more generic if you want. :) Daniel -- A large number of installed systems work by fiat. That is, they work by being declared to work. -- Anatol Holt
Re: tramp with 'plink -pw'
On Wed, 28 Feb 2001, Tom Roche wrote: >> One thing I'm wondering: since the error is >> *Backtrace* >>> Signaling: (error "Couldn't find remote shell or passwd prompt") >> is there a problem with my shell-prompt-pattern? It's currently set >> to >> (setq shell-prompt-pattern "^[^#$%>\n]*[#$>] *") Daniel Pittman <[EMAIL PROTECTED]> 01 Mar 2001 13:48:16 +1100 > Yeah, that fails to match: >>> Running user customized standard startup activities ... >>> End of login--close console. >>> [1m/ncsu/tlroche> [m > Because of the trailing escape sequence "[m". > The right fix, as I said above, is to have the silly tcsh on the remote > machine *not* automatically try to underline your command prompt. > Probably by setting PS1 in the login script. OK, I'll get back to you about that. Meanwhile, something easier is to take the 'set prompt' out of .mycshrc, which changes the last line to > unity% which might be easier to match. I tried changing to (setq shell-prompt-pattern "^.*unity%\s-*") which still doesn't work. Any suggestions? TIA, [EMAIL PROTECTED]
Re: tramp with 'plink -pw'
On Wed, 28 Feb 2001, Tom Roche wrote: > On Wed, 28 Feb 2001, Tom Roche wrote: >>> One thing I'm wondering: since the error is > >>> *Backtrace* Signaling: (error "Couldn't find remote shell or passwd prompt") > >>> is there a problem with my shell-prompt-pattern? It's currently set >>> to > >>> (setq shell-prompt-pattern "^[^#$%>\n]*[#$>] *") > > Daniel Pittman <[EMAIL PROTECTED]> 01 Mar 2001 13:48:16 +1100 >> Yeah, that fails to match: > Running user customized standard startup activities ... End of login--close console. [1m/ncsu/tlroche> [m > >> Because of the trailing escape sequence "[m". > >> The right fix, as I said above, is to have the silly tcsh on the >> remote machine *not* automatically try to underline your command >> prompt. Probably by setting PS1 in the login script. > > OK, I'll get back to you about that. Meanwhile, something easier is > to take the 'set prompt' out of .mycshrc, which changes the last > line to That was your work? Oh. Our default tcsh here does it for free so I assumed... :) >> unity% > > which might be easier to match. I tried changing to > > (setq shell-prompt-pattern "^.*unity%\s-*") You want "^.*unity%", which should work as well. I don't think that you need to match punctuation characters at the end at all, really... Oh, and you wanted "\\s-*" - the double-backslash is essential. :) The default `shell-prompt-pattern' should work fine, though, for that prompt. Can you send a full trace thingy (elide the banner if you wish) with the new shell prompt? Daniel -- Open the tombs and see the bones there mixed in mockery! Which dust was servant, and which was lord's?--open the tomb and see! -- Shaikh Saadi, _Gulistan_, (c. 1265)
Re: tramp with 'plink -pw'
On 01 Mar 2001, Daniel Pittman wrote: > On Wed, 28 Feb 2001, Tom Roche wrote: >> >> is there a problem with my shell-prompt-pattern? It's currently set >> to >> >>> (setq shell-prompt-pattern "^[^#$%>\n]*[#$>] *") > > Yeah, that fails to match: > > [...] > >>> Running user customized standard startup activities ... >>> End of login--close console. >>> [1m/ncsu/tlroche> [m > > Because of the trailing escape sequence "[m". I think it's because of the `^' anchor in the regexp and the _leading_ escape sequence `ESC [ 1 m' :-) kai -- Be indiscrete. Do it continuously.