Re: [Proftpd-user] Response error from backend control channel with mod_proxy and mod_sftp

Serge Basterot <[email protected]> Wed, 19 Jul 2023 17:35:38 +0200
Newsgroups gmane.network.proftpd.user
Message-ID <[email protected]>
Hello,

Le 2023-07-19 17:00, TJ Saunders a écrit :

> I suspect we're going to need more details to pin down the issues
> here.  First, what specific version of ProFTPD, mod_proxy are you
> using?

I'm using proftpd-1.3.8.tar.gz and proftpd-mod_proxy-0.9.2.tar.gz.

> Next, could you configure some trace logging for this?  I recommend
> adding _e.g._:
> 
>   TraceLog /path/to/proftpd/trace.log
>   Trace proxy:20 \
>     proxy.conn:20 \
>     proxy.reverse:20 \
>     proxy.ssh.kex:20 \
>     proxy.ssh.msg:20 \
>     proxy.ssh.packet:20 \
>     sftp:20 \
>     ssh2:20

I restart proftpd with this trace conf and now I have this in the log :

2023-07-19 15:23:30,539 [10] <ssh2:9>: loading host key from file 
'/opt/proftpd/conf/keys/test-key-rsa'
2023-07-19 15:23:30,542 [10] <ssh2:4>: using 
'/opt/proftpd/conf/keys/test-key-rsa' as RSA hostkey (2048 bits)
2023-07-19 15:23:30,544 [10] <proxy.conn:12>: connecting to backend 
address 10.1.80.171#8022 from 10.1.80.139#36381
2023-07-19 15:23:30,547 [10] <proxy.conn:5>: successfully connected to 
10.1.80.171#8022 from 10.1.80.139#36381
2023-07-19 15:23:30,547 [10] <proxy.reverse:8>: connected to backend 
'sftp://10.1.80.171:8022' in 3 ms
2023-07-19 15:23:30,547 [10] <proxy:9>: removed PRE_CMD APPE mod_xfer 
handlers
2023-07-19 15:23:30,547 [10] <proxy:9>: removed PRE_CMD RETR mod_xfer 
handlers
2023-07-19 15:23:30,547 [10] <proxy:9>: removed PRE_CMD STOR mod_xfer 
handlers
2023-07-19 15:23:30,547 [10] <proxy:9>: removed PRE_CMD STOU mod_xfer 
handlers
2023-07-19 15:23:30,548 [10] <proxy:15>: found group 'NONE' for command 
'SSH-2.0-OPENSSH_8.9P1'
2023-07-19 15:23:30,548 [10] <proxy:9>: chrooted session to 
'/ftp-proxytables/empty'
2023-07-19 15:23:30,548 [10] <proxy:7>: error checking for async 
messages from the backend server: Invalid argument

Using the command line sftp client, it starts but the connection hangs 
and the prompt never returns :

$ sftp -vvv [email protected]
OpenSSH_8.9p1 Ubuntu-3ubuntu0.1, OpenSSL 3.0.2 15 Mar 2022
debug1: Reading configuration data /home/sba/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include 
/etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> 
'/home/sba/.ssh/known_hosts'
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> 
'/home/sba/.ssh/known_hosts2'
debug2: resolving "my.server" port 22
debug3: resolve_host: lookup my.server:22
debug3: ssh_connect_direct: entering
debug1: Connecting to my.server [xxx.xxx.xxx.xxx] port 22.
debug3: set_sock_tos: set socket 3 IP_TOS 0x10
debug1: Connection established.
debug1: identity file /home/sba/.ssh/id_rsa type 0
debug1: identity file /home/sba/.ssh/id_rsa-cert type -1
debug1: identity file /home/sba/.ssh/id_ecdsa type -1
debug1: identity file /home/sba/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/sba/.ssh/id_ecdsa_sk type -1
debug1: identity file /home/sba/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /home/sba/.ssh/id_ed25519 type -1
debug1: identity file /home/sba/.ssh/id_ed25519-cert type -1
debug1: identity file /home/sba/.ssh/id_ed25519_sk type -1
debug1: identity file /home/sba/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /home/sba/.ssh/id_xmss type -1
debug1: identity file /home/sba/.ssh/id_xmss-cert type -1
debug1: identity file /home/sba/.ssh/id_dsa type -1
debug1: identity file /home/sba/.ssh/id_dsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.9p1 Ubuntu-3ubuntu0.1
debug1: kex_exchange_identification: banner line 0: 530 Please login 
with USER and PASS

Thanks for helping me

-- 
Serge


_______________________________________________
ProFTPD Users List   <[email protected]>
Unsubscribe problems?
http://www.proftpd.org/list-unsub.html