I've run into this strange issue of not being able to connect with ssh user@domain -s sftp.
sshd_config on target specifies Subsystem sftp /usr/libexec/openssh/sftp-server, the sftp-server file is there and I've created symlinks to it in /usr/bin, /usr/sbin etc. as so which sftp-server shows correct executable.
Plain sftp user@domain and ssh user@domain are working without problems.
running with -vvvreaches debug2: subsystem request accepted on channel 0 and hands up, until I ctrl+c-it.
There are no overshadowing configurations for sshd on target and ssh on client.
On target /var/log/secure for [sshd] ends on :
sshd[324070]: debug3: send packet: type 99
sshd[324070]: debug3: mm_request_receive entering
sshd[324070]: debug3: monitor_read: checking request 124
sshd logs shows no errors with connection.
sshd_config have only one Subsystem parameter defined for sftp and really whole config is unmodified (default).
I've tried connecting to these targets OSs : Red Hat 8.6, Ubuntu 22.04 and MacOS 13.2.1 (zsh 5.8.1).
I want to be able to use ssh with -s and to defined multiple Subsystems.
Based on this: https://www.oreilly.com/library/view/ssh-the-secure/0596008953/ch05s08.html I understand that my usage of this flag is correct as the desired subsystem should be placed in ssh call as remote-command.
Please correct me if I am wrong (with the usage) and maybe preferably point out any sources that might help with making this work.
Thanks!