Re: Console example - WeOnlyDo Discussion board

Re: Console example (General questions)

by Hans, Sunday, December 31, 2006, 14:52 (6537 days ago) @ woddrazen

Hi Drazen,

First it is important that you ones generate private key and load that key before you start server created by wodSSHServer ActiveX component.

Have done that in the main function, seems to work ok.

You can choose protocol you wish to use using wodSSHServer Protocol Property (SSH2, Telnet).
If you don't want to use default port 22 for SSH2 or 23 for Telnet Protocol you can use Port Property and change port to some other.

The defaults are good enough, I can see that it is listening on port 22, so that is ok.

In LoginPassword Event who fires when user wants to authenticate to the server, you can determine which user will be able to connect.Also important is ServiceRequest Event. ServiceRequest Event fires when user requests some service from the server.

I think the first event that is triggered is the connecting event
I have:
[code]STDMETHODIMP CwodSSHDNotify::XNotify::Connecting(IwodSSHDCom * Owner, ISSHUser * User, SSHActions * Action)
{
METHOD_PROLOGUE(CwodSSHDNotify, Notify);
puts( connecting );
*Action=Allow;
return S_OK;
}[/code]
The same goes for LoginPassword, LoginPubkey and ServiceRequest.

From a linux client I get the following information:
$ ssh -v 192.xx.xx.xx
..
debug1: connecting to 192.xx.xx.xx port 22
debug1: connection establisted
and then the connection hangs

I think that the problem lies that the Notify functions are somehow not correctly linked and therefore not triggered.

If it is easier I could sent you the complete c++ project or perhaps is it possible that you supply a working console version based on the notify sample ?

Hans


Complete thread: