unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* tramp again
@ 2002-08-22  1:12 Miles Bader
  2002-08-22  8:13 ` Andreas Schwab
  2002-08-22 15:31 ` Kai Großjohann
  0 siblings, 2 replies; 8+ messages in thread
From: Miles Bader @ 2002-08-22  1:12 UTC (permalink / raw)


It's been a while since I last tried tramp, so I checked to see if I
could a simple `su' today.  Here's what happened.

First, I tried `/su:localhost:/etc', and tramp told me `you must use a
username with the `su' method'.  This seems wrong -- 99% of the time,
when someone su's they want to su to root; it's annoying enough that
you have to type `localhost', but why should you have to type `root' too?

Okay, anyway, I next tried `/su:root@localhost:/etc'.  Tramp asked me
for a password, and I gave the root password.  Then tramp appeared to
hang, displaying the message:

   Looking for pattern \(Store key in cache\? (y/n)\)\s-*

I guess it was actually looping; here's the *Messages* contents:

   tramp: Opening connection for `root' using `su'...
   tramp: Processing actions
   tramp: Waiting 60s for prompt from remote shell
   tramp: Looking for pattern ^.*\([pP]assword\|passphrase.*\):
   Password: .......
   tramp: Looking for pattern .*ogin: *
   tramp: Looking for pattern ^\(([^) 	]*)\|[^> 	]*[>]\)\s-*
   tramp: Looking for pattern ^.*\(Connection \(?:\(?:clo\|refu\)sed\)\|Host key verification failed\.\|Login \(?:[Ii]ncorrect\)\|Name or service not known\|\(?:Permission denied\|Sorry, try again\)\.\).*\|^.*\(Received signal [0-9]+\).*
   tramp: Looking for pattern \(Are you sure you want to continue connecting (yes/no)\?\)\s-*
   tramp: Looking for pattern \(Store key in cache\? (y/n)\)\s-*
   tramp: Looking for pattern ^.*\([pP]assword\|passphrase.*\):
   tramp: Looking for pattern .*ogin: *
   tramp: Looking for pattern ^\(([^) 	]*)\|[^> 	]*[>]\)\s-*
   tramp: Looking for pattern ^.*\(Connection \(?:\(?:clo\|refu\)sed\)\|Host key verification failed\.\|Login \(?:[Ii]ncorrect\)\|Name or service not known\|\(?:Permission denied\|Sorry, try again\)\.\).*\|^.*\(Received signal [0-9]+\).*
   tramp: Looking for pattern \(Are you sure you want to continue connecting (yes/no)\?\)\s-*
   tramp: Looking for pattern \(Store key in cache\? (y/n)\)\s-*
   tramp: Looking for pattern ^.*\([pP]assword\|passphrase.*\):
   tramp: Looking for pattern .*ogin: *
   tramp: Looking for pattern ^\(([^) 	]*)\|[^> 	]*[>]\)\s-*
   tramp: Looking for pattern ^.*\(Connection \(?:\(?:clo\|refu\)sed\)\|Host key verification failed\.\|Login \(?:[Ii]ncorrect\)\|Name or service not known\|\(?:Permission denied\|Sorry, try again\)\.\).*\|^.*\(Received signal [0-9]+\).*
   tramp: Looking for pattern \(Are you sure you want to continue connecting (yes/no)\?\)\s-*
   tramp: Looking for pattern \(Store key in cache\? (y/n)\)\s-*
   Quit

Here's the contents of the `*tramp/su root@localhost*' buffer:


   mcspd15:~# 

[I indented it; it's actually flush with the left margin]

Has tramp been fixed to not use `shell-prompt-pattern' incorrectly yet?

Maybe that's the problem.

I did (setq shell-prompt-pattern nil) and tried again.  This time, it
hung displaying:

   Waiting 30s for remote `/bin/sh' to come up...

Not sure what was wrong this time; the contents of the `*tramp...'
buffer were the same as before, but *Messages* showed:

   tramp: Opening connection for `root' using `su'...
   tramp: Processing actions
   tramp: Waiting 60s for prompt from remote shell
   tramp: Looking for pattern ^.*\([pP]assword\|passphrase.*\):
   Password: .......
   tramp: Looking for pattern .*ogin: *
   tramp: Looking for pattern nil
   tramp: Found remote shell prompt.
   tramp: Waiting 30s for remote `/bin/sh' to come up...
   Quit

Does tramp seem this fragile for anyone else?

-Miles
-- 
I'd rather be consing.

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

* Re: tramp again
  2002-08-22  1:12 tramp again Miles Bader
@ 2002-08-22  8:13 ` Andreas Schwab
  2002-08-22 12:19   ` Robert J. Chassell
  2002-08-22 15:31 ` Kai Großjohann
  1 sibling, 1 reply; 8+ messages in thread
From: Andreas Schwab @ 2002-08-22  8:13 UTC (permalink / raw)
  Cc: emacs-devel

Miles Bader <miles@lsi.nec.co.jp> writes:

|> Does tramp seem this fragile for anyone else?

The only reliable method for me is scp.  I just tried su, and had no
problem with logging in, but I wasn't able to transfer a file, the same
problem that I have with the ssh method.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

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

* Re: tramp again
  2002-08-22  8:13 ` Andreas Schwab
@ 2002-08-22 12:19   ` Robert J. Chassell
  2002-08-22 15:55     ` Kai Großjohann
  0 siblings, 1 reply; 8+ messages in thread
From: Robert J. Chassell @ 2002-08-22 12:19 UTC (permalink / raw)


   Miles Bader asked:

   > Does tramp seem this fragile for anyone else?

In today's CVS snapshot, 2002 Aug 22  11:55 UTC,
GNU Emacs 21.3.50.181 (i686-pc-linux-gnu, X toolkit)
running:

    emacs -q --no-site-file --eval '(blink-cursor-mode 0)'

the following found the desired remote directory successfully:

(progn
  (require 'tramp)
  (setq tramp-verbose 10)
  (setq tramp-debug-buffer t)
  ;; running `emacs -q' so need to set this
  (custom-set-variables '(shell-prompt-pattern "^[^#$%
]*[#$%>] *")))

    (find-file "/ssh:bob@titan.berkshire.net:/home/bob/www/" nil)


However, the following:

    (find-file
     "/multi:ssh:bob@24.161.120.95:ssh:bob@192.168.2.48:/home/bob" nil)

`worked but with a problem':  tramp visited both both a multi-hop
remote file that I did not seek, which is this one:

    /multi:ssh:bob@24.161.120.95:ssh:bob@192.168.2.48:/home/bob/.alias

and the directory that I did seek, namely:

    /multi:ssh:bob@24.161.120.95:ssh:bob@192.168.2.48:/home/bob/


Incidentally, I did not know I had a .alias file in that directory;
it was installed by Debian when the directory was created.


Here is the output from:

*debug tramp/multi ssh#bob@24.161.120.95:ssh#bob@192.168.2.48:* 



# Opening `multi' connection...
# Waiting 60s for local shell to come up...
sh-2.05b$ # Sending rlogin command `ssh 24.161.120.95 -l bob'
# Waiting 60s for prompt from remote shell
# Looking for pattern ^.*\([pP]assword\|passphrase.*\):
# Looking for pattern .*ogin: *
# Looking for pattern ^[^#$%
]*[#$%>] *
# Looking for pattern ^.*\(Connection \(?:\(?:clo\|refu\)sed\)\|Host key verification failed\.\|Login \(?:[Ii]ncorrect\)\|Name or service not known\|\(?:Permission denied\|Sorry, try again\)\.\).*\|^.*\(Received signal [0-9]+\).*
# Looking for pattern ^.*\([pP]assword\|passphrase.*\):
# Looking for pattern .*ogin: *
# Looking for pattern ^[^#$%
]*[#$%>] *
# Looking for pattern ^.*\(Connection \(?:\(?:clo\|refu\)sed\)\|Host key verification failed\.\|Login \(?:[Ii]ncorrect\)\|Name or service not known\|\(?:Permission denied\|Sorry, try again\)\.\).*\|^.*\(Received signal [0-9]+\).*
# Looking for pattern ^.*\([pP]assword\|passphrase.*\):
# Looking for pattern .*ogin: *
# Looking for pattern ^[^#$%
]*[#$%>] *
# Looking for pattern ^.*\(Connection \(?:\(?:clo\|refu\)sed\)\|Host key verification failed\.\|Login \(?:[Ii]ncorrect\)\|Name or service not known\|\(?:Permission denied\|Sorry, try again\)\.\).*\|^.*\(Received signal [0-9]+\).*
# Looking for pattern ^.*\([pP]assword\|passphrase.*\):
# Looking for pattern .*ogin: *
# Looking for pattern ^[^#$%
]*[#$%>] *
# Looking for pattern ^.*\(Connection \(?:\(?:clo\|refu\)sed\)\|Host key verification failed\.\|Login \(?:[Ii]ncorrect\)\|Name or service not known\|\(?:Permission denied\|Sorry, try again\)\.\).*\|^.*\(Received signal [0-9]+\).*
# Looking for pattern ^.*\([pP]assword\|passphrase.*\):
# Looking for pattern .*ogin: *
# Looking for pattern ^[^#$%
]*[#$%>] *
# Looking for pattern ^.*\(Connection \(?:\(?:clo\|refu\)sed\)\|Host key verification failed\.\|Login \(?:[Ii]ncorrect\)\|Name or service not known\|\(?:Permission denied\|Sorry, try again\)\.\).*\|^.*\(Received signal [0-9]+\).*
# Looking for pattern ^.*\([pP]assword\|passphrase.*\):
# Looking for pattern .*ogin: *
# Looking for pattern ^[^#$%
]*[#$%>] *
# Looking for pattern ^.*\(Connection \(?:\(?:clo\|refu\)sed\)\|Host key verification failed\.\|Login \(?:[Ii]ncorrect\)\|Name or service not known\|\(?:Permission denied\|Sorry, try again\)\.\).*\|^.*\(Received signal [0-9]+\).*
# Looking for pattern ^.*\([pP]assword\|passphrase.*\):
# Looking for pattern .*ogin: *
# Looking for pattern ^[^#$%
]*[#$%>] *
# Looking for pattern ^.*\(Connection \(?:\(?:clo\|refu\)sed\)\|Host key verification failed\.\|Login \(?:[Ii]ncorrect\)\|Name or service not known\|\(?:Permission denied\|Sorry, try again\)\.\).*\|^.*\(Received signal [0-9]+\).*
# Looking for pattern ^.*\([pP]assword\|passphrase.*\):
# Looking for pattern .*ogin: *
# Looking for pattern ^[^#$%
]*[#$%>] *
# Looking for pattern ^.*\(Connection \(?:\(?:clo\|refu\)sed\)\|Host key verification failed\.\|Login \(?:[Ii]ncorrect\)\|Name or service not known\|\(?:Permission denied\|Sorry, try again\)\.\).*\|^.*\(Received signal [0-9]+\).*
# Looking for pattern ^.*\([pP]assword\|passphrase.*\):
# Looking for pattern .*ogin: *
# Looking for pattern ^[^#$%
]*[#$%>] *
# Looking for pattern ^.*\(Connection \(?:\(?:clo\|refu\)sed\)\|Host key verification failed\.\|Login \(?:[Ii]ncorrect\)\|Name or service not known\|\(?:Permission denied\|Sorry, try again\)\.\).*\|^.*\(Received signal [0-9]+\).*
# Looking for pattern ^.*\([pP]assword\|passphrase.*\):
# Looking for pattern .*ogin: *
# Looking for pattern ^[^#$%
]*[#$%>] *
# Looking for pattern ^.*\(Connection \(?:\(?:clo\|refu\)sed\)\|Host key verification failed\.\|Login \(?:[Ii]ncorrect\)\|Name or service not known\|\(?:Permission denied\|Sorry, try again\)\.\).*\|^.*\(Received signal [0-9]+\).*
# Looking for pattern ^.*\([pP]assword\|passphrase.*\):
# Looking for pattern .*ogin: *
# Looking for pattern ^[^#$%
]*[#$%>] *
# Looking for pattern ^.*\(Connection \(?:\(?:clo\|refu\)sed\)\|Host key verification failed\.\|Login \(?:[Ii]ncorrect\)\|Name or service not known\|\(?:Permission denied\|Sorry, try again\)\.\).*\|^.*\(Received signal [0-9]+\).*
# Looking for pattern ^.*\([pP]assword\|passphrase.*\):
# Looking for pattern .*ogin: *
# Looking for pattern ^[^#$%
]*[#$%>] *
# Found shell prompt on `24.161.120.95'
# Sending rlogin command `ssh 192.168.2.48 -l bob'
# Waiting 60s for prompt from remote shell
# Looking for pattern ^.*\([pP]assword\|passphrase.*\):
# Looking for pattern .*ogin: *
# Looking for pattern ^[^#$%
]*[#$%>] *
# Looking for pattern ^.*\(Connection \(?:\(?:clo\|refu\)sed\)\|Host key verification failed\.\|Login \(?:[Ii]ncorrect\)\|Name or service not known\|\(?:Permission denied\|Sorry, try again\)\.\).*\|^.*\(Received signal [0-9]+\).*
# Looking for pattern ^.*\([pP]assword\|passphrase.*\):
# Looking for pattern .*ogin: *
# Looking for pattern ^[^#$%
]*[#$%>] *
# Looking for pattern ^.*\(Connection \(?:\(?:clo\|refu\)sed\)\|Host key verification failed\.\|Login \(?:[Ii]ncorrect\)\|Name or service not known\|\(?:Permission denied\|Sorry, try again\)\.\).*\|^.*\(Received signal [0-9]+\).*
# Looking for pattern ^.*\([pP]assword\|passphrase.*\):
# Looking for pattern .*ogin: *
# Looking for pattern ^[^#$%
]*[#$%>] *
# Looking for pattern ^.*\(Connection \(?:\(?:clo\|refu\)sed\)\|Host key verification failed\.\|Login \(?:[Ii]ncorrect\)\|Name or service not known\|\(?:Permission denied\|Sorry, try again\)\.\).*\|^.*\(Received signal [0-9]+\).*
# Looking for pattern ^.*\([pP]assword\|passphrase.*\):
# Looking for pattern .*ogin: *
# Looking for pattern ^[^#$%
]*[#$%>] *
# Looking for pattern ^.*\(Connection \(?:\(?:clo\|refu\)sed\)\|Host key verification failed\.\|Login \(?:[Ii]ncorrect\)\|Name or service not known\|\(?:Permission denied\|Sorry, try again\)\.\).*\|^.*\(Received signal [0-9]+\).*
# Looking for pattern ^.*\([pP]assword\|passphrase.*\):
# Looking for pattern .*ogin: *
# Looking for pattern ^[^#$%
]*[#$%>] *
# Looking for pattern ^.*\(Connection \(?:\(?:clo\|refu\)sed\)\|Host key verification failed\.\|Login \(?:[Ii]ncorrect\)\|Name or service not known\|\(?:Permission denied\|Sorry, try again\)\.\).*\|^.*\(Received signal [0-9]+\).*
# Looking for pattern ^.*\([pP]assword\|passphrase.*\):
# Looking for pattern .*ogin: *
# Looking for pattern ^[^#$%
]*[#$%>] *
# Found shell prompt on `192.168.2.48'
$ exec /bin/sh
# Waiting 30s for remote `/bin/sh' to come up...
<bob@tesop> ~ $ # Setting up remote shell environment
<bob@tesop> ~ $ <bob@tesop> ~ $ # Determining coding system
foo
bar
<bob@tesop> ~ $ # Waiting 30s for `HISTFILE=$HOME/.tramp_history; HISTSIZE=1'
<bob@tesop> ~ $ # Waiting 30s for `set +o vi +o emacs'
<bob@tesop> ~ $ # Waiting 30s for `unset MAIL MAILCHECK MAILPATH'
<bob@tesop> ~ $ # Waiting 30s for `unset CDPATH'
<bob@tesop> ~ $ # Setting shell prompt
$ PS1='
/////
'; PS2=''; PS3=''
$ echo ~root
/root
# Remote `/bin/sh' groks tilde expansion, good
# Finding command to check if file exists
$ test -e / 2>/dev/null; echo tramp_exit_status $? 
tramp_exit_status 0
$ test -e /\ this\ file\ does\ not\ exist\  2>/dev/null; echo tramp_exit_status $? 
tramp_exit_status 1
# Finding a suitable `ls' command
# Checking remote `/bin/ls' command for `-n' option
$ test -x /bin/ls 2>/dev/null; echo tramp_exit_status $? 
tramp_exit_status 0
# Testing remote command `/bin/ls' for -n...
$ /bin/ls -lnd / >/dev/null 2>/dev/null; echo tramp_exit_status $? 
tramp_exit_status 0
# Testing remote command `/bin/ls' for -n...okay
# Using remote command `/bin/ls' for getting directory listings
$ tramp_set_exit_status () {
return $1
}
$ test -e /bin 2>/dev/null; echo tramp_exit_status $? 
tramp_exit_status 0
$ ( test -d /bin 2>/dev/null; echo tramp_exit_status $? )
tramp_exit_status 0
$ test -e /usr/bin 2>/dev/null; echo tramp_exit_status $? 
tramp_exit_status 0
$ ( test -d /usr/bin 2>/dev/null; echo tramp_exit_status $? )
tramp_exit_status 0
$ test -e /usr/sbin 2>/dev/null; echo tramp_exit_status $? 
tramp_exit_status 0
$ ( test -d /usr/sbin 2>/dev/null; echo tramp_exit_status $? )
tramp_exit_status 0
$ test -e /usr/local/bin 2>/dev/null; echo tramp_exit_status $? 
tramp_exit_status 0
$ ( test -d /usr/local/bin 2>/dev/null; echo tramp_exit_status $? )
tramp_exit_status 0
$ test -e /usr/ccs/bin 2>/dev/null; echo tramp_exit_status $? 
tramp_exit_status 1
$ test -e /local/bin 2>/dev/null; echo tramp_exit_status $? 
tramp_exit_status 1
$ test -e /local/freeware/bin 2>/dev/null; echo tramp_exit_status $? 
tramp_exit_status 1
$ test -e /local/gnu/bin 2>/dev/null; echo tramp_exit_status $? 
tramp_exit_status 1
$ test -e /usr/freeware/bin 2>/dev/null; echo tramp_exit_status $? 
tramp_exit_status 1
$ test -e /usr/pkg/bin 2>/dev/null; echo tramp_exit_status $? 
tramp_exit_status 1
$ test -e /usr/contrib/bin 2>/dev/null; echo tramp_exit_status $? 
tramp_exit_status 1
$ PATH=/bin:/usr/bin:/usr/sbin:/usr/local/bin; export PATH
$ LC_TIME=C; export LC_TIME; echo huhu
huhu
$ mesg n; echo huhu
huhu
$ biff n ; echo huhu
huhu
$ unalias ls; echo huhu
sh: unalias: ls: not found
huhu
$ ( test / -nt / )
$ tramp_test_nt () {
test -n "`find $1 -prune -newer $2 -print`"
}
$ tramp_uudecode () {
(echo begin 600 /tmp/tramp.$$; tail +2) | uudecode
cat /tmp/tramp.$$
rm -f /tmp/tramp.$$
}
$ while read d; do if test -x $d/perl5 -a -f $d/perl5; then echo tramp_executable $d/perl5; break; fi; done <<'EOF'
$ /bin
$ /usr/bin
$ /usr/sbin
$ /usr/local/bin
$ /usr/ccs/bin
$ /local/bin
$ /local/freeware/bin
$ /local/gnu/bin
$ /usr/freeware/bin
$ /usr/pkg/bin
$ /usr/contrib/bin
$ EOF
$ while read d; do if test -x $d/perl -a -f $d/perl; then echo tramp_executable $d/perl; break; fi; done <<'EOF'
$ /bin
$ /usr/bin
$ /usr/sbin
$ /usr/local/bin
$ /usr/ccs/bin
$ /local/bin
$ /local/freeware/bin
$ /local/gnu/bin
$ /usr/freeware/bin
$ /usr/pkg/bin
$ /usr/contrib/bin
$ EOF
tramp_executable /usr/bin/perl
# Sending the Perl `file-attributes' implementation.
$ tramp_file_attributes () {
/usr/bin/perl -e '$f = $ARGV[0];
@s = lstat($f);
if (($s[2] & 0170000) == 0120000) { $l = readlink($f); $l = "\"$l\""; }
elsif (($s[2] & 0170000) == 040000) { $l = "t"; }
else { $l = "nil" };
printf("(%s %u %d %d (%u %u) (%u %u) (%u %u) %u %u t (%u . %u) (%u %u))\n",
$l, $s[3], $s[4], $s[5], $s[8] >> 16 & 0xffff, $s[8] & 0xffff,
$s[9] >> 16 & 0xffff, $s[9] & 0xffff, $s[10] >> 16 & 0xffff, $s[10] & 0xffff,
$s[7], $s[2], $s[1] >> 16 & 0xffff, $s[1] & 0xffff, $s[0] >> 16 & 0xffff, $s[0] & 0xffff);' $1 2>/dev/null
}
# Sending the Perl `mime-encode' implementations.
$ tramp_encode () {
/usr/bin/perl -e '
# This script contributed by Juanma Barranquero <lektu@terra.es>.
# Copyright (C) 2002 Free Software Foundation, Inc.
use strict;

my %trans = do {
    my $i = 0;
    map {(substr(unpack(q(B8), chr $i++), 2, 6), $_)}
      split //, q(ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/);
};

binmode(\*STDIN);

# We read in chunks of 54 bytes, to generate output lines
# of 72 chars (plus end of line)
$/ = \54;

while (my $data = <STDIN>) {
    my $pad = q();

    # Only for the last chunk, and only if did not fill the last three-byte packet
    if (eof) {
        my $mod = length($data) % 3;
        $pad = q(=) x (3 - $mod) if $mod;
    }

    # Not the fastest method, but it is simple: unpack to binary string, split
    # by groups of 6 bits and convert back from binary to byte; then map into
    # the translation table
    print
      join q(),
        map($trans{$_},
            (substr(unpack(q(B*), $data) . q(00000), 0, 432) =~ /....../g)),
              $pad,
                qq(\n);
}
' 2>/dev/null
}
$ tramp_encode_with_module () {
perl -MMIME::Base64 -0777 -ne 'print encode_base64($_)' 2>/dev/null
}
# Sending the Perl `mime-decode' implementations.
$ tramp_decode () {
/usr/bin/perl -e '
# This script contributed by Juanma Barranquero <lektu@terra.es>.
# Copyright (C) 2002 Free Software Foundation, Inc.
use strict;

my %trans = do {
    my $i = 0;
    map {($_, sprintf(q(%06b), $i++))}
      split //, q(ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/)
};

my %bytes = map {(unpack(q(B8), chr $_), chr $_)} 0 .. 255;

binmode(\*STDOUT);

# We are going to accumulate into $pending to accept any line length
# (we do not check they are <= 76 chars as the RFC says)
my $pending = q();

while (my $data = <STDIN>) {
    chomp $data;

    # If we find one or two =, we have reached the end and
    # any following data is to be discarded
    my $finished = $data =~ s/(==?).*/$1/;
    $pending .= $data;

    my $len = length($pending);
    my $chunk = substr($pending, 0, $len & ~3, q());

    # Easy method: translate from chars to (pregenerated) six-bit packets, join,
    # split in 8-bit chunks and convert back to char.
    print join q(),
      map $bytes{$_},
        ((join q(), map {$trans{$_} || q()} split //, $chunk) =~ /......../g);

    last if $finished;
}
' 2>/dev/null
}
$ tramp_decode_with_module () {
perl -MMIME::Base64 -0777 -ne 'print decode_base64($_)' 2>/dev/null
}
$ while read d; do if test -x $d/ln -a -f $d/ln; then echo tramp_executable $d/ln; break; fi; done <<'EOF'
$ /bin
$ /usr/bin
$ /usr/sbin
$ /usr/local/bin
$ /usr/ccs/bin
$ /local/bin
$ /local/freeware/bin
$ /local/gnu/bin
$ /usr/freeware/bin
$ /usr/pkg/bin
$ /usr/contrib/bin
$ EOF
tramp_executable /bin/ln
# Checking remote encoding command `mimencode -b' for sanity
$ ( mimencode -b </dev/null >/dev/null 2>/dev/null; echo tramp_exit_status $? )
tramp_exit_status 0
# Checking remote decoding command `mimencode -u -b' for sanity
$ ( echo xyzzy | mimencode -b | mimencode -u -b >/dev/null 2>/dev/null; echo tramp_exit_status $? )
tramp_exit_status 0
# Checking to see if encoding/decoding commands work on remote host...
$ echo xyzzy | mimencode -b | mimencode -u -b
xyzzy
# Checking to see if encoding/decoding commands work on remote host...done
$ ( test -d /home/bob 2>/dev/null; echo tramp_exit_status $? )
tramp_exit_status 0
$ ( test -d /home/bob 2>/dev/null; echo tramp_exit_status $? )
tramp_exit_status 0
# Inserting directory `ls -al /multi:ssh:bob@24.161.120.95:ssh:bob@192.168.2.48:/home/bob/', wildcard no, fulldir yes
$ /bin/ls -al /home/bob/.
total 344
-rw-r--r--    1 1001     console       231 Oct 23  2001 #*mail*#15260wHf#
-rw-r--r--    1 1001     console       209 Oct 23  2001 #*mail*#156164Lf#
-rw-r--r--    1 1001     console       845 Oct 23  2001 #*mail*#15624LOf#
drwxr-sr-x   11 1001     console      4096 Mar 15 17:45 .
drwxrwsr-x   12 root     staff        4096 Jun 23 05:54 ..
-rw-r--r--    1 1001     console       266 Aug 11  2001 .alias
-rw-r--r--    1 1001     console      4648 Aug 11  2001 .bash_alias
-rw-------    1 1001     console      6076 Apr  4 10:27 .bash_history
-rw-r--r--    1 1001     console       219 Dec 18  2001 .bash_profile
-rw-r--r--    1 1001     console       221 Aug 11  2001 .bash_profile.~1~
-rw-r--r--    1 1001     console        68 Aug 11  2001 .bash_profile~
-rw-r--r--    1 1001     console        55 Aug 11  2001 .bashrc
-rw-r--r--    1 1001     console       375 Aug 11  2001 .cshrc
-rw-------    1 1001     console       515 Dec 18  2001 .cvspass
-rw-r--r--    1 1001     console      1758 Oct 23  2001 .emacs
drwxr-sr-x    3 1001     console      4096 Oct 23  2001 .emacs.d
-rw-r--r--    1 1001     console       515 Aug 11  2001 .emacs.~1~
-rw-r--r--    1 1001     console     54760 Oct 23  2001 .emacs_short
-rw-r--r--    1 1001     console     54208 Oct 23  2001 .emacs_short.~1~
drwxr-sr-x    3 1001     console      4096 Mar 15 17:45 .gnome
drwx------    2 1001     console      4096 Mar 15 17:45 .gnome_private
drwxr-sr-x    5 1001     console      4096 Aug 11  2001 .netscape
-rw-r--r--    1 1001     console       127 Aug 11  2001 .signature
drwxr-sr-x    2 1001     console      4096 Oct  5  2001 .ssh
-rw-------    1 1001     console        62 Nov 21  2001 .tramp_history
-rw-r--r--    1 1001     console     13718 Sep  5  2001 .twmrc
-rw-r--r--    1 1001     console      1289 Sep  5  2001 .xinitrc
-rw-r--r--    1 1001     console       183 Aug 11  2001 RMAIL
-rw-r--r--    1 1001     console      5966 Aug 11  2001 X-log-2
drwxrwxrwx    2 1001     console      4096 Sep  3  2001 bob-speech
drwxr-sr-x    2 1001     console      4096 Aug 11  2001 emacs
-rw-r--r--    1 1001     console        73 Dec 18  2001 foo
-rw-r--r--    1 1001     console        70 Dec 16  2001 foo.el
-rw-r--r--    1 1001     console        73 Dec 16  2001 foo.el.~1~
-rw-r--r--    1 1001     console       964 Aug 11  2001 foo.pr
-rw-r--r--    1 1001     console        34 Aug 11  2001 foo.~1~
-rw-r--r--    1 1001     console        45 Aug 11  2001 foo.~2~
-rw-r--r--    1 1001     console       413 Aug 11  2001 foo.~3~
-rw-r--r--    1 1001     console      3237 Aug 11  2001 foobar
-rw-r--r--    1 1001     console      6909 Dec 19  2001 how-to-emacs
-rw-r--r--    1 1001     console      6862 Dec 18  2001 how-to-emacs.~1~
-rw-r--r--    1 1001     console      6716 Dec 18  2001 how-to-emacs.~2~
drwx--S---    2 1001     console      4096 Aug 11  2001 nsmail
-r--r--r--    1 1001     console       413 Aug 11  2001 test-page
drwxr-xr-x   10 1001     console      4096 Aug 11  2001 themes
-rw-r--r--    1 1001     console        16 Aug 11  2001 tty1
-rw-r--r--    1 1001     console       565 Aug 11  2001 v.pr
-rw-r--r--    1 1001     console       590 Aug 11  2001 v2.pr
-rw-r--r--    1 1001     console       584 Aug 11  2001 v3.pr
$ cd
$ test -e /home/bob/ 2>/dev/null; echo tramp_exit_status $? 
tramp_exit_status 0
# file attributes with perl: /multi:ssh:bob@24.161.120.95:ssh:bob@192.168.2.48:/home/bob/
$ tramp_file_attributes /home/bob/
(t 11 1001 1001 (15716 51505) (15506 31084) (15506 31084) 4096 17901 t (2 . 45985) (0 839))
$ test -e /home/bob/.alias 2>/dev/null; echo tramp_exit_status $? 
tramp_exit_status 0
$ ( test -d /home/bob/.alias 2>/dev/null; echo tramp_exit_status $? )
tramp_exit_status 1
# Finding true name for `/multi:ssh:bob@24.161.120.95:ssh:bob@192.168.2.48:/home/bob/.alias'
# Check /home
$ test -e /home 2>/dev/null; echo tramp_exit_status $? 
tramp_exit_status 0
# file attributes with perl: /multi:ssh:bob@24.161.120.95:ssh:bob@192.168.2.48:/home
$ tramp_file_attributes /home
(t 12 0 50 (15716 48459) (15637 39656) (15637 39656) 4096 17917 t (0 . 2) (0 839))
# Check /home/bob
$ test -e /home/bob 2>/dev/null; echo tramp_exit_status $? 
tramp_exit_status 0
# file attributes with perl: /multi:ssh:bob@24.161.120.95:ssh:bob@192.168.2.48:/home/bob
$ tramp_file_attributes /home/bob
(t 11 1001 1001 (15716 51505) (15506 31084) (15506 31084) 4096 17901 t (2 . 45985) (0 839))
# Check /home/bob/.alias
$ test -e /home/bob/.alias 2>/dev/null; echo tramp_exit_status $? 
tramp_exit_status 0
# file attributes with perl: /multi:ssh:bob@24.161.120.95:ssh:bob@192.168.2.48:/home/bob/.alias
$ tramp_file_attributes /home/bob/.alias
(nil 1 1001 1001 (15332 12548) (15221 21125) (15267 30346) 266 33188 t (2 . 45988) (0 839))
# True name of `/multi:ssh:bob@24.161.120.95:ssh:bob@192.168.2.48:/home/bob/.alias' is `/home/bob/.alias'
$ test -e /home/bob/.alias 2>/dev/null; echo tramp_exit_status $? 
tramp_exit_status 0
# file attributes with perl: /multi:ssh:bob@24.161.120.95:ssh:bob@192.168.2.48:/home/bob/.alias
$ tramp_file_attributes /home/bob/.alias
(nil 1 1001 1001 (15332 12548) (15221 21125) (15267 30346) 266 33188 t (2 . 45988) (0 839))
# Finding true name for `/multi:ssh:bob@24.161.120.95:ssh:bob@192.168.2.48:/home/bob/.alias'
# Check /home
$ test -e /home 2>/dev/null; echo tramp_exit_status $? 
tramp_exit_status 0
# file attributes with perl: /multi:ssh:bob@24.161.120.95:ssh:bob@192.168.2.48:/home
$ tramp_file_attributes /home
(t 12 0 50 (15716 48459) (15637 39656) (15637 39656) 4096 17917 t (0 . 2) (0 839))
# Check /home/bob
$ test -e /home/bob 2>/dev/null; echo tramp_exit_status $? 
tramp_exit_status 0
# file attributes with perl: /multi:ssh:bob@24.161.120.95:ssh:bob@192.168.2.48:/home/bob
$ tramp_file_attributes /home/bob
(t 11 1001 1001 (15716 51505) (15506 31084) (15506 31084) 4096 17901 t (2 . 45985) (0 839))
# Check /home/bob/.alias
$ test -e /home/bob/.alias 2>/dev/null; echo tramp_exit_status $? 
tramp_exit_status 0
# file attributes with perl: /multi:ssh:bob@24.161.120.95:ssh:bob@192.168.2.48:/home/bob/.alias
$ tramp_file_attributes /home/bob/.alias
(nil 1 1001 1001 (15332 12548) (15221 21125) (15267 30346) 266 33188 t (2 . 45988) (0 839))
# True name of `/multi:ssh:bob@24.161.120.95:ssh:bob@192.168.2.48:/home/bob/.alias' is `/home/bob/.alias'
$ test -e /home/bob/.alias 2>/dev/null; echo tramp_exit_status $? 
tramp_exit_status 0
# file attributes with perl: /multi:ssh:bob@24.161.120.95:ssh:bob@192.168.2.48:/home/bob/.alias
$ tramp_file_attributes /home/bob/.alias
(nil 1 1001 1001 (15332 12548) (15221 21125) (15267 30346) 266 33188 t (2 . 45988) (0 839))
$ test -e /home/bob/.alias 2>/dev/null; echo tramp_exit_status $? 
tramp_exit_status 0
$ test -e /home/bob/.alias 2>/dev/null; echo tramp_exit_status $? 
tramp_exit_status 0
# Encoding remote file /multi:ssh:bob@24.161.120.95:ssh:bob@192.168.2.48:/home/bob/.alias...
$ mimencode -b < /home/bob/.alias 2>/dev/null; echo tramp_exit_status $? 
IyAkSWQ6IHNrZWwuYWxpYXMsdiAxLjIgMTk5OC8wNC8yMCAxMTo0MTozMiBsdWlzZ2ggRXhw
ICQKIyBMdWlzIEZyYW5jaXNjbyBHb2564WxleiA8bHVpc2doQGRlYmlhbi5vcmc+IGJhc2Vk
IG9uIHRoYXQgb2YgVmFkaWsgVnlnb25ldHMKIyBQbGVhc2UgY2hlY2sgL3Vzci9kb2MvdGNz
aC9leGFtcGxlcy9hbGlhcyB0byBzZWUgb3RoZXIgcG9zc2libGUgdmFsdWVzLgphbGlhcwls
cwknbHMgLS1jb2xvcj1hdXRvJwphbGlhcwltZAlta2RpcgphbGlhcwlyZAlybWRpcgo=
tramp_exit_status 0
# Decoding remote file /multi:ssh:bob@24.161.120.95:ssh:bob@192.168.2.48:/home/bob/.alias...
# Decoding remote file /multi:ssh:bob@24.161.120.95:ssh:bob@192.168.2.48:/home/bob/.alias with function base64-decode-region...
# Decoding remote file /multi:ssh:bob@24.161.120.95:ssh:bob@192.168.2.48:/home/bob/.alias...done
$ test -e /home/bob/.alias 2>/dev/null; echo tramp_exit_status $? 
tramp_exit_status 0
# file attributes with perl: /multi:ssh:bob@24.161.120.95:ssh:bob@192.168.2.48:/home/bob/.alias
$ tramp_file_attributes /home/bob/.alias
(nil 1 1001 1001 (15716 51515) (15221 21125) (15267 30346) 266 33188 t (2 . 45988) (0 839))
# Inserting local temp file `/tmp/tramp.9751zMo'...
$ test -e /home/bob/.alias 2>/dev/null; echo tramp_exit_status $? 
tramp_exit_status 0
$ test -w /home/bob/.alias 2>/dev/null; echo tramp_exit_status $? 
tramp_exit_status 1
$ test -e /home/bob/.alias 2>/dev/null; echo tramp_exit_status $? 
tramp_exit_status 0
$ test -e /home/bob/.alias 2>/dev/null; echo tramp_exit_status $? 
tramp_exit_status 0
# file attributes with perl: /multi:ssh:bob@24.161.120.95:ssh:bob@192.168.2.48:/home/bob/.alias
$ tramp_file_attributes /home/bob/.alias
(nil 1 1001 1001 (15716 51515) (15221 21125) (15267 30346) 266 33188 t (2 . 45988) (0 839))
$ test -e /home/bob/.alias 2>/dev/null; echo tramp_exit_status $? 
tramp_exit_status 0
$ test -e /home/bob/.alias 2>/dev/null; echo tramp_exit_status $? 
tramp_exit_status 0
# file attributes with perl: /multi:ssh:bob@24.161.120.95:ssh:bob@192.168.2.48:/home/bob/.alias
$ tramp_file_attributes /home/bob/.alias
(nil 1 1001 1001 (15716 51515) (15221 21125) (15267 30346) 266 33188 t (2 . 45988) (0 839))
$ test -e /home/bob/RCS/.alias\,v 2>/dev/null; echo tramp_exit_status $? 
tramp_exit_status 1
$ test -e /home/bob/.alias\,v 2>/dev/null; echo tramp_exit_status $? 
tramp_exit_status 1
$ test -e /home/bob/RCS/.alias 2>/dev/null; echo tramp_exit_status $? 
tramp_exit_status 1
$ test -r /home/bob/CVS/Entries 2>/dev/null; echo tramp_exit_status $? 
tramp_exit_status 1
$ test -e /home/bob/SCCS/s..alias 2>/dev/null; echo tramp_exit_status $? 
tramp_exit_status 1
$ test -e /home/bob/s..alias 2>/dev/null; echo tramp_exit_status $? 
tramp_exit_status 1
$ test -e /home/bob/.alias 2>/dev/null; echo tramp_exit_status $? 
tramp_exit_status 0
# file attributes with perl: /multi:ssh:bob@24.161.120.95:ssh:bob@192.168.2.48:/home/bob/.alias
$ tramp_file_attributes /home/bob/.alias
(nil 1 1001 1001 (15716 51515) (15221 21125) (15267 30346) 266 33188 t (2 . 45988) (0 839))

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

* Re: tramp again
  2002-08-22  1:12 tramp again Miles Bader
  2002-08-22  8:13 ` Andreas Schwab
@ 2002-08-22 15:31 ` Kai Großjohann
  2002-08-23  1:36   ` Miles Bader
  1 sibling, 1 reply; 8+ messages in thread
From: Kai Großjohann @ 2002-08-22 15:31 UTC (permalink / raw)
  Cc: emacs-devel

Miles Bader <miles@lsi.nec.co.jp> writes:

> It's been a while since I last tried tramp, so I checked to see if I
> could a simple `su' today.  Here's what happened.
>
> First, I tried `/su:localhost:/etc', and tramp told me `you must use a
> username with the `su' method'.  This seems wrong -- 99% of the time,
> when someone su's they want to su to root; it's annoying enough that
> you have to type `localhost', but why should you have to type `root' too?

I agree that this is annoying.  I didn't think of providing short
filenames when I was working on Tramp initially.

I have now changed Tramp to assume "root" when the user name isn't
specified in the filename.  The change has not been committed yet,
I'll check it in with the next batch of changes.  I assume it's not
that urgent.

> Okay, anyway, I next tried `/su:root@localhost:/etc'.  Tramp asked me
> for a password, and I gave the root password.  Then tramp appeared to
> hang, displaying the message:
>
>    Looking for pattern \(Store key in cache\? (y/n)\)\s-*
>
> I guess it was actually looping; here's the *Messages* contents: [...]
> Here's the contents of the `*tramp/su root@localhost*' buffer:
>
>
>    mcspd15:~# 
>
> [I indented it; it's actually flush with the left margin]
>
> Has tramp been fixed to not use `shell-prompt-pattern' incorrectly yet?
>
> Maybe that's the problem.

I guess that the shell-prompt-pattern is still the problem.  I didn't
have much time to work on Tramp recently.  I have now committed
version 2.0.14 which tries to fix this.

Whenever Tramp looks for a shell prompt, it uses shell-prompt-pattern
in addition to the new variable tramp-shell-prompt-pattern.  The
default value for the new variable is the same as the default value
for shell-prompt-pattern.

> I did (setq shell-prompt-pattern nil) and tried again.

Well, now either Tramp doesn't recognize any shell prompts at all, or
it recognizes the string "nil" as the shell prompt.

> This time, it hung displaying:
>
>    Waiting 30s for remote `/bin/sh' to come up...
>
> Not sure what was wrong this time; the contents of the `*tramp...'
> buffer were the same as before, but *Messages* showed:
>
>    tramp: Opening connection for `root' using `su'...
>    tramp: Processing actions
>    tramp: Waiting 60s for prompt from remote shell
>    tramp: Looking for pattern ^.*\([pP]assword\|passphrase.*\):
>    Password: .......
>    tramp: Looking for pattern .*ogin: *
>    tramp: Looking for pattern nil

It seems it searches for the string "nil".

>    tramp: Found remote shell prompt.
>    tramp: Waiting 30s for remote `/bin/sh' to come up...
>    Quit
>
> Does tramp seem this fragile for anyone else?

I'm sorry that there are so many troubles with it.  It is, however,
not easy to get it right.  (At least not for me.)  I hope you're not
too angry and give me a chance to fix all the problems that appear.
I want to get it working right!

kai
-- 
A large number of young women don't trust men with beards.  (BFBS Radio)

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

* Re: tramp again
  2002-08-22 12:19   ` Robert J. Chassell
@ 2002-08-22 15:55     ` Kai Großjohann
  2002-08-22 17:00       ` Robert J. Chassell
  0 siblings, 1 reply; 8+ messages in thread
From: Kai Großjohann @ 2002-08-22 15:55 UTC (permalink / raw)
  Cc: emacs-devel

"Robert J. Chassell" <bob@rattlesnake.com> writes:

> However, the following:
>
>     (find-file
>      "/multi:ssh:bob@24.161.120.95:ssh:bob@192.168.2.48:/home/bob" nil)
>
> `worked but with a problem':  tramp visited both both a multi-hop
> remote file that I did not seek, which is this one:
>
>     /multi:ssh:bob@24.161.120.95:ssh:bob@192.168.2.48:/home/bob/.alias
>
> and the directory that I did seek, namely:
>
>     /multi:ssh:bob@24.161.120.95:ssh:bob@192.168.2.48:/home/bob/

Fascinating.  I have never heard of this behavior.

What does the following eval to?

(file-expand-wildcards "/multi:ssh:bob@24.161.120.95:ssh:bob@192.168.2.48:/home/bob")

It would also be interesting to see the corresponding part of the
*debug tramp/foo* buffer.

I tried to reproduce your problem with 

C-x C-f /multi:ssh:grossjoh@schulz:ssh:grossjoh@lydia:~/ RET

but I could reproduce it.  I just got a directory listing of my home
dir on that host, but no additional file.  The variable
find-file-wildcards is t in my Emacs.

kai
-- 
A large number of young women don't trust men with beards.  (BFBS Radio)

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

* Re: tramp again
  2002-08-22 15:55     ` Kai Großjohann
@ 2002-08-22 17:00       ` Robert J. Chassell
  2002-08-22 17:38         ` Kai Großjohann
  0 siblings, 1 reply; 8+ messages in thread
From: Robert J. Chassell @ 2002-08-22 17:00 UTC (permalink / raw)
  Cc: emacs-devel

   > However, the following:
   >
   >     (find-file
   >      "/multi:ssh:bob@24.161.120.95:ssh:bob@192.168.2.48:/home/bob" nil)
   >
   > `worked but with a problem':  tramp visited both both a multi-hop
   > remote file that I did not seek, ...

   Fascinating.  I have never heard of this behavior.

I figured out what happened.  I don't know whether to call this a
self-generated problem or a user-interface problem.  Probably, it is
best to call it a self-generated problem caused by typing a RET ahead
of time and not realizing that I did that.

I redid the find-file, but this time typed my (rather complicated)
second password correctly and the directory came up properly.

In the earlier attempt, I typed the password to 192.168.2.48 twice
erroneously before succeeding the third time.  What I think now is
that after I typed the password the last time, I also typed an extra
carriage return.  This carriage return was then saved for the 29
seconds that passed before the directory got listed, at which point
the extra carriage return evoked the `dired-advertised-find-file'
command on the ~bob/.alias file.

I can reproduce the problem by typing a second carriage return
immediately after I type the second password.  I can also reproduce
the problem by typing an `e' or an `f' immediately after typing the
RET for my password.

I think this is my problem, not an interface problem:  type-ahead
should occur.  Perhaps it would be a good idea to remind people about
type-ahead in the documentation, if it is not described already.

In this case, I did not realize I had typed ahead. (All I remember of
that attempt is that I made many mistakes when I typed that password;
however, since I can reproduce the problem with a typed-ahead RET,
`e', or `f', I assume that is what I did.)

-- 
    Robert J. Chassell            bob@rattlesnake.com  bob@gnu.org
    Rattlesnake Enterprises       http://www.rattlesnake.com
    Free Software Foundation      http://www.gnu.org   GnuPG Key ID: 004B4AC8

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

* Re: tramp again
  2002-08-22 17:00       ` Robert J. Chassell
@ 2002-08-22 17:38         ` Kai Großjohann
  0 siblings, 0 replies; 8+ messages in thread
From: Kai Großjohann @ 2002-08-22 17:38 UTC (permalink / raw)
  Cc: emacs-devel

"Robert J. Chassell" <bob@rattlesnake.com> writes:

> I think this is my problem, not an interface problem:  type-ahead
> should occur.  Perhaps it would be a good idea to remind people about
> type-ahead in the documentation, if it is not described already.

As you might imagine,¹ I never thought that this might be a problem,
so this is not covered in the documentation.  Let me add it.

I agree that it is strange that Emacs keeps a key you type for maybe
half a minute, before executing it.  But I guess other than making
Tramp faster, there's not really a good solution.

kai

¹ Why should you imagine this?  Well, because I didn't foresee any of
  the other problems, either...
-- 
A large number of young women don't trust men with beards.  (BFBS Radio)

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

* Re: tramp again
  2002-08-22 15:31 ` Kai Großjohann
@ 2002-08-23  1:36   ` Miles Bader
  0 siblings, 0 replies; 8+ messages in thread
From: Miles Bader @ 2002-08-23  1:36 UTC (permalink / raw)
  Cc: emacs-devel

Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:
> > I did (setq shell-prompt-pattern nil) and tried again.
> 
> Well, now either Tramp doesn't recognize any shell prompts at all, or
> it recognizes the string "nil" as the shell prompt.

Gee, now I feel stupid... I'm so used to `nil' as a nop value that I
didn't think how silly it is in this case!

Anyway, things do work now, as I said in my other message.

> I'm sorry that there are so many troubles with it.  It is, however,
> not easy to get it right.

Er, well, I think it's a rather hard task actually; I'm grateful that
you're doing it.

Thanks,

-Miles
-- 
`Life is a boundless sea of bitterness'

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

end of thread, other threads:[~2002-08-23  1:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-22  1:12 tramp again Miles Bader
2002-08-22  8:13 ` Andreas Schwab
2002-08-22 12:19   ` Robert J. Chassell
2002-08-22 15:55     ` Kai Großjohann
2002-08-22 17:00       ` Robert J. Chassell
2002-08-22 17:38         ` Kai Großjohann
2002-08-22 15:31 ` Kai Großjohann
2002-08-23  1:36   ` Miles Bader

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).