1834532 Members
3381 Online
110069 Solutions
New Discussion

scp error with rsh

 
SOLVED
Go to solution
Albert Goodman
Advisor

scp error with rsh

I am trying to use putty scp on windows (pscp) to transfer a windows file to a HP-UX 11i server. This works when the HP-UX user uses a 'normal' sh. However, it fails with the following error if the HP-UX user has a restricted sh such as rsh or rksh:


Attached are the logs for both sessions. Does anyone have any suggestion?
2 REPLIES 2
Ermin Borovac
Honored Contributor
Solution

Re: scp error with rsh

I think it doesn't work because scp is making use of /opt/ssh/libexec/sftp-server (If you are using HP's ssh), which is not in the PATH of restricted shell user.

So either put /opt/ssh/libexec in the PATH of the restricted user or create a link from /opt/ssh/libexec/sftp-server to /usr/bin.

Restricted shell doesn't allow execution of files by specifying absolute path so change sshd_config as follows

Subsystem sftp /opt/ssh/libexec/sftp-server

to

Subsystem sftp sftp-server
Ermin Borovac
Honored Contributor

Re: scp error with rsh

Forgot to mention that you have create an empty /sftp-server file otherwise it won't work.

# touch /sftp-server