How can I request the SFTP service type from SSH c (General questions)
Hello,
I am using the wodSSH on the client part and wodSSHServer on the server part. On the ServiceRequest event (on server) I always set the ServiceType to stNone (0), because I didn't care the service type requested by the client.
But now, the client needs, at request to send a file to the server. So, on the server part I need to use the SFTP capabilities in order to upload that file. So, in the ServiceRequest event on the server I need to have ServiceType = stSubsystem (3). The server cannot set itself this value because he needs to do the other job too (and that job need the service type to be stNone). So, I need that the client to REQUEST this type of service.
I try to do that by setting on the client part, the Subsystem property of SSH to the SFPT string. But it doesn't work. The value that server ssh receive for the service type is strange (something like 15272820) and not always the same... :(
Please tell me how can I do the client to request the protocol that it need (sometimes SFTP, sometimes stNone).
I think that it's possible, because you say in the SSH Server help that:
ServiceRequest is fired after successful authentication of the user with your server. At this point (but also it is possible later to occur) user will request some service, such as to execute shell or some program on your system, or to start SFTP server (implemented internally by wodSSHD).
I hope you can help me with this.
Anca.