Re: Subsystem sftp invoked even though forced command created

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]


On Wed, 5 Jul 2023, Damien Miller wrote:

> Some possibilities:
> 1. the receive.ksh script is faulty in some way that causes it to invoke
>    sftp-server
> 2. some changes made by Redhat in the binaries they provided, not present
>    in the OpenSSH source we release have broken forced commands.
> #2 could be excluded by reproducing the problem using a sshd built from
> source, without redhat's patches.

FWIW, I've rebuilt openssh-7.4 from source and attempted a sftp connection
with a ForceCommand set in sshd_config. The sftp session fails as expected:

[djm@djm ~]$ sftp -oPort=2222 ::1 
Authenticated to ::1 ([::1]:2222) using "publickey".
Received message too long 1482184792
Ensure the remote shell produces no output for non-interactive sessions.
Transferred: sent 2260, received 1520 bytes, in 0.0 seconds
Bytes per second: sent 614738.3, received 413452.3

On the server side:

debug2: subsystem request for sftp by user djm
debug1: subsystem: exec() /usr/libexec/sftp-server
Starting session: forced-command (config) '/tmp/xxx' for djm from ::1 port 32870 id 0

openssh-unix-dev mailing list

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux