Mailing List Archive

future of subsystem requests
I was testing the Linux port of 2.1.0p2 and noticed that the F-Secure SSH
client for Windows 4.0 couldn't successfully connect using its secure
file-transfer facility.

The server log reported that authentication was successful, then the log
left off with a semi-cryptic "subsystem request for sftp" line. After
that, nothing.

Poking around the source, I found this little routine in session.c (it
appears to be identical to the same routine in the OpenBSD source, so it's
not a porting issue):

int
session_subsystem_req(Session *s)
{
unsigned int len;
int success = 0;
char *subsys = packet_get_string(&len);

packet_done();
log("subsystem request for %s", subsys);

xfree(subsys);
return success;
}

To my eyes, this looks like a planned no-op. Markus Friedl earlier
reported that, as of late April, sftp was still on the to-do list. What
about the future (or lack thereof) of an OpenSSH subsystem facility in
general?

Paul Heinlein
heinlein@cse.ogi.edu
Re: future of subsystem requests [ In reply to ]
On Mon, May 22, 2000 at 11:15:59AM -0700, Paul Heinlein wrote:
> I was testing the Linux port of 2.1.0p2 and noticed that the F-Secure SSH
> client for Windows 4.0 couldn't successfully connect using its secure
> file-transfer facility.

SFTP is a proprietary protocol, but feel free to re-engineer it :)
it is not related to SSH at all.

> int
> session_subsystem_req(Session *s)
> {
> unsigned int len;
> int success = 0;
> char *subsys = packet_get_string(&len);
>
> packet_done();
> log("subsystem request for %s", subsys);
>
> xfree(subsys);
> return success;
> }
>
> To my eyes, this looks like a planned no-op. Markus Friedl earlier
> reported that, as of late April, sftp was still on the to-do list. What

SFTP is not a top priority. SecureFX works fine with OpenSSH.

> about the future (or lack thereof) of an OpenSSH subsystem facility in
> general?

subsystem support is almost complete, you can try this patch if you want to test:

Index: session.c
===================================================================
RCS file: /home/markus/cvs/ssh/session.c,v
retrieving revision 1.12
diff -u -r1.12 session.c
--- session.c 2000/05/03 18:03:07 1.12
+++ session.c 2000/05/18 19:18:53
@@ -1203,6 +1214,14 @@
packet_done();
log("subsystem request for %s", subsys);

+#define SFTPSERVER "/path/to/ssh/com/source/sftp-server2"
+#ifdef SFTPSERVER
+ if (strcmp(subsys, "sftp") == 0) {
+ debug("subsystem: exec() " SFTPSERVER);
+ do_exec_no_pty(s, SFTPSERVER, s->pw);
+ success = 1;
+ }
+#endif
xfree(subsys);
return success;
}

-markus