This is a discussion on Re: sshrc not working when using restricted shells on HP-UX within the OpenSSH Development forums, part of the Networking and Network Related category; Darren Tucker wrote: > Darren Tucker wrote: > > Tob_Sch@gmx.de wrote: > > [about restricted shells] > >&...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Darren Tucker wrote:
> Darren Tucker wrote: > > Tob_Sch@gmx.de wrote: > > [about restricted shells] > >> Here's the error message during starting the connection: > >> > >> sh: /bin/sh: The operation is not allowed in a restricted shell. > > > > I would interpret that as one of the commands in the sshrc failing, > > rather than parsing of the file itself failing. What's in sshrc? Does > > putting "set -x" at the top of sshrc provide any enlightenment? > > Looking at the code, it does: > f = popen(_PATH_BSHELL " " _PATH_SSH_SYSTEM_RC, "w"); > > which is effectively running: > > /bin/sh /usr/local/etc/sshrc > > I suspect the difference is that the platforms that work use /bin/sh for > popen() but HP-UX uses the login shell. > ... > The Linux man page says unequivocally that it uses /bin/sh. I can't > conveniently check HP-UX right now. The HP-UX 11.00 popen(3S) documentation says: popen() creates a pipe between the calling program and a command to be executed by the POSIX shell, /usr/bin/sh (see sh-posix(1)). On HP-UX /bin is a symlink to /usr/bin since HP-UX 10.01. So effectively this is also /bin/sh, a POSIX shell, on HP-UX. Bob _______________________________________________ openssh-unix-dev mailing list openssh-unix-dev@mindrot.org http://www.mindrot.org/mailman/listi...enssh-unix-dev |