On Mon, Aug 13, 2012 at 5:55 PM, Modeel, Subin <[email protected]> wrote:
> Thanks for your reply Bernd.
>
> I was talking about DatgramChAnnel provide by java. When the IoAcceptor binds 
> it opens a selector but registers only one channel.

now you start confusing me. datagram usually refers to UDP, while SSH
generally only works over TCP, doesn't it?
Also, you didn't mention DatagramChannel in your previous post.

> I wish to register multiple channels(DatagramChannel).Each channel will be 
> bound to different virtual ip.

Even more confusion. Every IP needs it's own connection, right? So,
together with this from you last post...

>> In my simulator each of my simulated device which is a java object has
>> a channel which will register itself to the singleton selector .As such I 
>> can have many simulated devices each having a channel And all of them 
>> associated with the single selector.

... I still don't understand what you are trying to achieve.

Maybe someone more familiar with SSHD needs to chime in.

  Bernd

> -Subin
>
> -----Original Message-----
> From: Bernd Fondermann [mailto:[email protected]]
> Sent: Monday, August 13, 2012 9:07 PM
> To: [email protected]
> Subject: Re: SSHD and MINA with multiple channels
>
> On Mon, Aug 13, 2012 at 12:51 PM, Modeel, Subin <[email protected]> wrote:
>>
>> Hi.
>>
>> I am working on a device simulator which needs a SSH support. I am 
>> attempting at using SSHD which I found to be a very good implementation of 
>> sshd in JAVA.
>> But my adoption of SSHD needs to satisfy a scalability requirement.
>>
>> In my simulator each of my simulated device which is a java object has
>> a channel which will register itself to the singleton selector .As such I 
>> can have many simulated devices each having a channel And all of them 
>> associated with the single selector.
>> I wish to have the same  architecture in SSHD.
>> Selector.open();
>>
>> .......//multiple channels
>> Channel.socket().bind(new InetSocketAddress( virtual ip, 161))
>> channel.register(selector, ops, callback);
>>
>>
>> I wish to achieve the same in SSHD+MINA. I was looking at the code and
>> I found that NioSocketAcceptor.java will create a single channel as part of 
>> its open() method. I find the by default you cannot bind to many IPs in the 
>> SshServer.java I wish to modify SSHD and maybe even MINA for my project so 
>> that I can use the single instance of SSHDserver and which can service 
>> multiple channels associated with different IPs .
>> Please let me know your inputs or if you have any other way to use existing 
>> code to achieve my scalability.
>
> I think there are different notions of "channel" here.
> SSH establishes a Socket connection ("channel") between two endpoints.
> Within this one connection, SSH provides "logical" connections
> ("channels") to do different things like Secure Shell, Secure Copy etc. (a 
> quick google brought up 
> http://javaconfessions.com/2008/09/part-three-ssh-channels.html).
> These SSH channels are already supported by SSHD (since they are
> mandatory) and you don't need to create new sockets to use it.
>
> HTH, I'm not a SSH expert,
>
>   Bernd

Reply via email to