On 17 Apr 2000, Kai Großjohann wrote:

> Can you set rcp-debug-buffer to t and also post the contents of
> ``*debug rcp/foo*''?

--------
# Opening connection for mbp@localhost using scp...
# Waiting 60s for shell or passwd prompt from localhost
# Initializing remote shell
# Waiting 30s for remote /bin/sh to come up...
# Setting up remote shell environment
$ stty -onlcr -echo 1>/dev/null 2>/dev/null ; unset MAIL ; set +o
history 1>/dev/null 2>/dev/null ; PS1='
/////
'; PS2=''; PS3=''

stty -onlcr -echo 1>/dev/null 2>/dev/null ; unset MAIL ; set +o
history 1>/dev/null 2>/dev/null ; PS1='

/////

'; PS2=''; PS3=''



~$ 
~$ stty -onlcr -echo 1>/dev/null 2>/dev/null ; unset MAIL ; set +o 
history 1>/de 
v/null 2>/dev/null ; PS1='
> 
> /////
> 
> '; PS2=''; PS3=''


/////



/////



/////



/////

[[INCOMPLETE!]]
--------
 
> What do you see after doing `ssh localhost -l mbp' from a shell?  

--------
~$ ssh  localhost -l mbp
Last login: Tue Apr 18 11:47:34 2000 from :1 on 2


Most of the programs included with the Debian GNU/Linux system are
freely redistributable; the exact distribution terms for each
program
are described in the individual files in /usr/doc/*/copyright

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
You have mail.
~$ 
--------

> What is your shell-prompt-pattern set to? 

"^[^#$%>\n]*[#$%>] *"

which is the default according to emacs, defined in loaddefs.el.

> Does it match the motd, perhaps?

I copied the output into an emacs buffer and evaluated

  (search-forward-regexp shell-prompt-pattern)

and it failed.

> What happens if you type the commands `stty ... PS3=...' into the
> shell you get with `ssh localhost -l mbp'?

It seems to work as I'd expect: my $PS1 is set to five solidus with blank
lines on either side.  When I do this in a terminal, it comes out
stair-stepped, which I guess is to be expected because of the stty -onlcr.

--------
~$ stty -onlcr -echo 1>/dev/null 2>/dev/null ; unset MAIL ; set +o history
1>/dev/null 2>/dev/null ; PS1='
> /////
> '; PS2=''; PS3=''

/////


     /////



          /////



-------

Everything seems to have worked OK.  The contents of the debug buffer look
strange to me: I'm surprised that we got the prompt and echo halfway
through the buffer.

I see that my /etc/ssh/sshd_config has this at the end, which I think
comes from the Debian default:

-------
UseLogin no

# since these are likely to be being handled by PAM, switch them
off here
PrintMotd no
PrintLastLog no
CheckMail no
-------

Here's the whole sshd_config:

--------
Port 22
ListenAddress 0.0.0.0
HostKey /etc/ssh/ssh_host_key
ServerKeyBits 768
LoginGraceTime 600
KeyRegenerationInterval 3600
PermitRootLogin yes
IgnoreRhosts yes
StrictModes yes
X11Forwarding yes
X11DisplayOffset 10
KeepAlive yes

SyslogFacility AUTH
LogLevel INFO

RhostsAuthentication no
RhostsRSAAuthentication no
RSAAuthentication yes

PasswordAuthentication yes
PermitEmptyPasswords no

UseLogin no

PrintMotd no
PrintLastLog no
CheckMail no
-----

And my /etc/pam.d/ssh is

--------
#%PAM-1.0
auth       required     pam_nologin.so
auth       required     pam_unix.so
auth       required     pam_env.so # [1]

account    required     pam_unix.so

session    required     pam_unix.so
session    optional     pam_lastlog.so # [1]
session    optional     pam_motd.so # [1]
session    optional     pam_mail.so standard noenv # [1]

password   required     pam_unix.so

# Alternate strength checking for password. Note that this
# requires the libpam-cracklib package to be installed.
# You will need to comment out the password line above and
# uncomment the next two in order to use this.
#
# password required       pam_cracklib.so retry=3 minlen=6 difok=3
# password required       pam_unix.so use_authtok nullok md5
--------

The `# [1]' comment is there in the original; I guess it's some kind of
dpkg magic.  

I wonder... with the pam_lastlog.so, pam_motd.so and pam_mail.so commented
out, we just see

-------
/etc/pam.d$ ssh localhost
~$ exit
logout
Connection to localhost closed.
-------

but emacs is no happier. 

Thanks, Kai!
-- 
Martin Pool, Linuxcare, Inc.
+61 2 6262 8990
[EMAIL PROTECTED], http://www.linuxcare.com/
Linuxcare. Support for the revolution.




Reply via email to