Problems using sftp on HMC IBM system

Ben Lindstrom mouring at eviladmin.org
Wed Sep 23 02:08:01 EST 2009


On Sep 22, 2009, at 10:23 AM, Eduardo Otubo wrote:

> Ben Lindstrom wrote:
>>
>> A more useful thing to do is:
>>
>> $ ssh hscroot at skiper /bin/true ## Use where your true bin is  
>> located, on some it is /usr/bin/true
>>
>> If you see any output other than the "Banner" output (if you use  
>> one, which it doesn't look like it). You need to fix your shell to  
>> not output data on non-interactive shell connections.
>>
>> - Ben
>
> I think we're dealing with a very restricted shell, look what I got:
>
> otubo at phoenix ~ $ ssh hscroot at skiper /bin/true
> Password:
> /bin/bash: /bin/true: restricted: cannot specify `/' in command names
> otubo at phoenix ~ $ ssh hscroot at skiper true
> Password:
> otubo at phoenix ~ $
> otubo at phoenix ~ $ ssh hscroot at skiper
> Password:
> Last login: Tue Sep 22 12:02:00 2009 from 9.18.200.68
> hscroot at hmc:~>
> hscroot at hmc:~> which true
> which: no true in (/hmcrbin/:/usr/hmcrbin)
>
> Any ideias?
> []'s

Make sure your sshd_config has:

Subsystem sftp internal-sftp

Otherwise I highly doubt it will work with a restricted shell.  Since  
sshd is pretty much doing  $SHELL -c /path/to/sftp-server

- Ben


More information about the openssh-unix-dev mailing list