SSH ok, SFTP ok , SCP broken... custom shell

Graeme Tattersall graeme.tattersall at
Fri Dec 9 20:26:43 EST 2005

Frank Cusack wrote:
>>> if [ grep $LOGNAME /etc/shell.allow 2>&1 > /dev/null ]
>> 	if egrep "^$LOGNAME$" /etc/shell.allow


Thanks to everyone who responded.   I did cut the shell script in my first
message short to avoid posting too much to the list.

The user's shell is set to this wrapper script in /etc/passwd.

SCP fails with a usage message when running to this shell.   interactive login
(ssh), and sftp though are okay.

The script is type #!/bin/sh, running on RHEL3, which I believe is actually bash
running in a compatability mode.

the if statement is actually :

if /bin/grep -qw ^$LOGNAME $ALLOWFILE >/dev/null 2>/dev/null

end the exec line is :
    exec -a - $REALSHELL $*

I'll try changing the exec line to use "$@" instead of $* and report back.



Graeme Tattersall
GPG 0x97620D9F, 0xFBBDAB91
t: 0845 1199 900
d: 0131 514 4053

More information about the openssh-unix-dev mailing list