| Summary: | SSH_ORIGINAL_COMMAND does not contan the original command anymore | ||
|---|---|---|---|
| Product: | Portable OpenSSH | Reporter: | Martin Rupp <martin.rupp> |
| Component: | sshd | Assignee: | Assigned to nobody <unassigned-bugs> |
| Status: | CLOSED WONTFIX | ||
| Severity: | security | CC: | djm |
| Priority: | P5 | ||
| Version: | 9.0p1 | ||
| Hardware: | Other | ||
| OS: | Cygwin on NT/2k/Win7-11 | ||
|
Description
Martin Rupp
2022-10-19 22:39:43 AEDT
SSH_ORIGNAL_COMMAND is accurate: for the last few releases scp(1) has used the sftp protocol for file transfers, and the sftp protocol doesn't operate via the command-line as the scp/rcp protocol did. So there's no way to get the paths back in SSH_ORIGINAL_COMMAND for newer scp clients. The only controls over file visibility that are available for sftp-server are sshd_config ChrootDirectory and file system permissions. I cannot use the ChrootDirectory. I get an error. I think the issue is Cygwin (no root user) and also the constraint that all components of the Chroot path must be owned by UID 0 and GID 0 and only be writeable by root. Target path is /cygdrive/d/<subfolder1>/<subfolder2> Also Chroot is not very secure in Cygwin. It was so simple to filter the target path in SSH_ORIGINAL_COMMAND. I used only a simple script which I have assigned to the command part in the authorized keys. I have also a very bad issue with sshd in Cygwin. I can copy files to folders where the transfer user, used in the scp command, has no write permission. sshd is running under SYSTEM (= Local System). If I use it without the filter of the correct information in SSH_ORIGINAL_COMMAND, users can copy files to all location on the Windows server. It is very unsecure and it is unuseable for me. I need a solution as soon as possible. OpenSSH 9.3 has been released. Close resolved bugs |