Re: [Heads up] SSH server in java

2008-11-24 Thread Guillaume Nodet
Yes, a vote is already going on to start the SSH subproject.

On Sun, Nov 23, 2008 at 8:19 AM, Jason Dillon <[EMAIL PROTECTED]> wrote:
> On Nov 22, 2008, at 6:48 PM, Guillaume Nodet wrote:
>>>
>>> 
>>> Bliss:Applications jason$ ssh localhost -p 8081
>>> [EMAIL PROTECTED]'s password:
>>> channel_by_id: 1: bad id: channel free
>>> channel_input_success_failure: 1: unknown
>>> channel_by_id: 1: bad id: channel free
>>> channel_input_success_failure: 1: unknown
>>> 
>>>
>>> This is from "OpenSSH_5.1p1, OpenSSL 0.9.7l 28 Sep 2006" on Mac OS X.  It
>>> does connect and seems to work well.  Though seems to not handle sending
>>> over exceptions, like when a command is not resolved.  But I might look
>>> into
>>> that some more later today.
>>
>> Not sure what those lines mean.  When I connect using OpenSSH and
>> launch a bad command in ServiceMix, I can see the usual output from
>> gshell on stderr with the ansi colors.
>
> I will investigate more... I did not see the exception spat out on the
> client when entering a bad command... perhaps that is because of the above
> msgs?
>
>> There are still lots of things to do, but i think i could release a
>> 0.1 very soon.
>> Btw, this project should soon move into Apache as a Mina subproject,
>> but I will do a release before that at google so that we can embed it.
>
> Have you talked to the mina folks about it?  Anyways, I can't stop saying
> how thrilled I am about this.  You rock!  Needless to say next time we meet
> up I'm gonna buy you all the beer you can drink ;-)
>
> --jason
>
>
>>
>>> Your thoughts?
>>>
>>> --jason
>>>
>>>
>>> On Nov 13, 2008, at 5:58 AM, Guillaume Nodet wrote:
>>>
 I've just done a real quick prototype to plug into smx kernel and I've
 been able to log in into smx kernel using an ssh client and issue a
 few commands.
 Following is the class that does everything and the spring config to
 start the ssh server.
 The BogusPasswordAuthenticator is a dummy class which I pasted below
 too.

 Notice the use of stream filters to convert CR / CRLF stuff.  I think
 this is because both sshd and the geronimo gshell do not handle well
 the pty request and/or VT100 stuff.  But I'm still not sure where the
 conversion should happen exactly.

 Also note that i've redefined the ConsoleErrorHandlerImpl, because the
 default one uses the application.getIO() for displaying errors so they
 are not available remotely.

 Let me know what you think, but it basically makes the whole remote
 bits of gshell unused.
 I have not implemented the ssh command which should be easy using jsch
 lib.

 Let me know if / how I can help you with that bits.

 ==
 package org.apache.servicemix.kernel.gshell.core.sshd;

 import com.google.code.sshd.PasswordAuthenticator;

 public class BogusPasswordAuthenticator implements PasswordAuthenticator
 {

  public Object authenticate(String username, String password) {
 return (username != null && username.equals(password)) ?
 username : null;
  }
 }


 ==
  >>> init-method="start" destroy-method="stop">
 
 
 >>>
 class="org.apache.servicemix.kernel.gshell.core.sshd.GShellShellFactory">
 
 
 
 
 
 
 
 
 
 >>> class="org.apache.geronimo.gshell.wisdom.shell.HistoryImpl">
 
 
 
 
 >>> class="org.apache.geronimo.gshell.wisdom.shell.ConsolePrompterImpl">
 
 
 
 
 
 
 
 
 
 ${hostKey}
 
 
 
 
 
 
 >>>

 class="org.apache.servicemix.kernel.gshell.core.sshd.BogusPasswordAuthenticator"
 />
 
 
 
 
 
 >>> class="com.google.code.sshd.channel.ChannelSession$Factory" />
 
 
 
 
 >>> />
 >>> class="com.google.code.sshd.cipher.TripleDESCBC$Factory" />
 >>> class="com.google.code.sshd.cipher.BlowfishCBC$Factory" />
 >>> />
 >>> />
 
 
 
 
 >>> class="com.google.code.sshd.compression.CompressionNone$Factory" />
 
 
 
 
 
 
 
 
 
 
 
 
 
   

Re: [Heads up] SSH server in java

2008-11-22 Thread Jason Dillon

On Nov 22, 2008, at 6:48 PM, Guillaume Nodet wrote:


Bliss:Applications jason$ ssh localhost -p 8081
[EMAIL PROTECTED]'s password:
channel_by_id: 1: bad id: channel free
channel_input_success_failure: 1: unknown
channel_by_id: 1: bad id: channel free
channel_input_success_failure: 1: unknown


This is from "OpenSSH_5.1p1, OpenSSL 0.9.7l 28 Sep 2006" on Mac OS  
X.  It
does connect and seems to work well.  Though seems to not handle  
sending
over exceptions, like when a command is not resolved.  But I might  
look into

that some more later today.


Not sure what those lines mean.  When I connect using OpenSSH and
launch a bad command in ServiceMix, I can see the usual output from
gshell on stderr with the ansi colors.


I will investigate more... I did not see the exception spat out on the  
client when entering a bad command... perhaps that is because of the  
above msgs?



There are still lots of things to do, but i think i could release a
0.1 very soon.
Btw, this project should soon move into Apache as a Mina subproject,
but I will do a release before that at google so that we can embed it.


Have you talked to the mina folks about it?  Anyways, I can't stop  
saying how thrilled I am about this.  You rock!  Needless to say next  
time we meet up I'm gonna buy you all the beer you can drink ;-)


--jason





Your thoughts?

--jason


On Nov 13, 2008, at 5:58 AM, Guillaume Nodet wrote:

I've just done a real quick prototype to plug into smx kernel and  
I've

been able to log in into smx kernel using an ssh client and issue a
few commands.
Following is the class that does everything and the spring config to
start the ssh server.
The BogusPasswordAuthenticator is a dummy class which I pasted  
below too.


Notice the use of stream filters to convert CR / CRLF stuff.  I  
think

this is because both sshd and the geronimo gshell do not handle well
the pty request and/or VT100 stuff.  But I'm still not sure where  
the

conversion should happen exactly.

Also note that i've redefined the ConsoleErrorHandlerImpl, because  
the
default one uses the application.getIO() for displaying errors so  
they

are not available remotely.

Let me know what you think, but it basically makes the whole remote
bits of gshell unused.
I have not implemented the ssh command which should be easy using  
jsch

lib.

Let me know if / how I can help you with that bits.

==
package org.apache.servicemix.kernel.gshell.core.sshd;

import com.google.code.sshd.PasswordAuthenticator;

public class BogusPasswordAuthenticator implements  
PasswordAuthenticator {


 public Object authenticate(String username, String password) {
 return (username != null && username.equals(password)) ?
username : null;
 }
}


==
 
 
 
 class 
="org.apache.servicemix.kernel.gshell.core.sshd.GShellShellFactory">

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 class="com.google.code.sshd.hostkeys.FileHostKeyProvider">

 
 
 ${hostKey}
 
 
 
 
 
 
 class 
= 
"org 
.apache 
.servicemix.kernel.gshell.core.sshd.BogusPasswordAuthenticator"

/>
 
 
 
 
 
 
 
 
 
 
 
/>
 
 
 
/>
 
/>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 class="com.google.code.sshd.mac.HMACMD5$Factory" />
 class="com.google.code.sshd.mac.HMACSHA1$Factory" />
 class="com.google.code.sshd.mac.HMACMD596$Factory" />
 class="com.google.code.sshd.mac.HMACSHA196$Factory" />

 
 
 
 

 
 
 
 
 
 
 
 
 
 
 
 
 
 



===
package org.apache.servicemix.kernel.gshell.core.sshd;

import java.util.Map;
import java.util.List;
import java.io.OutputStream;
import java.io.InputStream;
import java.io.Closeable;
import java.io.IOException;

import com.google.code.sshd.ShellFactory;
import com.google.code.sshd.shell.CrLfFilterInputStream;
import org.apache.geronimo.gshell.shell.ShellContext;
import org.apache.geronimo.gshell.io.IO;
import org.apache.geronimo.gshell.command.Variables;
import org.apache.geronimo.gshell.console.Console;
import org.apache.geronimo.gshell.console.JLineConsole;
import  
org.apache.geronimo.gshell.console.completer.AggregateCompleter;

import 

Re: [Heads up] SSH server in java

2008-11-22 Thread Jason Dillon

On Nov 22, 2008, at 6:48 PM, Guillaume Nodet wrote:
On Sat, Nov 22, 2008 at 7:32 AM, Jason Dillon  
<[EMAIL PROTECTED]> wrote:

Any idea what this means:


Bliss:Applications jason$ ssh localhost -p 8081
[EMAIL PROTECTED]'s password:
channel_by_id: 1: bad id: channel free
channel_input_success_failure: 1: unknown
channel_by_id: 1: bad id: channel free
channel_input_success_failure: 1: unknown


This is from "OpenSSH_5.1p1, OpenSSL 0.9.7l 28 Sep 2006" on Mac OS  
X.  It
does connect and seems to work well.  Though seems to not handle  
sending
over exceptions, like when a command is not resolved.  But I might  
look into

that some more later today.


Not sure what those lines mean.  When I connect using OpenSSH and
launch a bad command in ServiceMix, I can see the usual output from
gshell on stderr with the ansi colors.


Kay, I've not idea either, they just poppeed out so I forwarded them  
on to you.



Whats the status of the SSH work, any release on the horizon?  I'm  
sold on
this for the GShell remoting direction, and really this is what I  
wanted
from the start.  So I'd like to drop the other whisper/remoting  
muck and

just use this.


There are still lots of things to do, but i think i could release a
0.1 very soon.
Btw, this project should soon move into Apache as a Mina subproject,
but I will do a release before that at google so that we can embed it.



Cool, a 0.1 would be awesome as soon as you can craft it.

--jason




Your thoughts?

--jason


On Nov 13, 2008, at 5:58 AM, Guillaume Nodet wrote:

I've just done a real quick prototype to plug into smx kernel and  
I've

been able to log in into smx kernel using an ssh client and issue a
few commands.
Following is the class that does everything and the spring config to
start the ssh server.
The BogusPasswordAuthenticator is a dummy class which I pasted  
below too.


Notice the use of stream filters to convert CR / CRLF stuff.  I  
think

this is because both sshd and the geronimo gshell do not handle well
the pty request and/or VT100 stuff.  But I'm still not sure where  
the

conversion should happen exactly.

Also note that i've redefined the ConsoleErrorHandlerImpl, because  
the
default one uses the application.getIO() for displaying errors so  
they

are not available remotely.

Let me know what you think, but it basically makes the whole remote
bits of gshell unused.
I have not implemented the ssh command which should be easy using  
jsch

lib.

Let me know if / how I can help you with that bits.

==
package org.apache.servicemix.kernel.gshell.core.sshd;

import com.google.code.sshd.PasswordAuthenticator;

public class BogusPasswordAuthenticator implements  
PasswordAuthenticator {


 public Object authenticate(String username, String password) {
 return (username != null && username.equals(password)) ?
username : null;
 }
}


==
 
 
 
 class 
="org.apache.servicemix.kernel.gshell.core.sshd.GShellShellFactory">

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 class="com.google.code.sshd.hostkeys.FileHostKeyProvider">

 
 
 ${hostKey}
 
 
 
 
 
 
 class 
= 
"org 
.apache 
.servicemix.kernel.gshell.core.sshd.BogusPasswordAuthenticator"

/>
 
 
 
 
 
 
 
 
 
 
 
/>
 
 
 
/>
 
/>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 class="com.google.code.sshd.mac.HMACMD5$Factory" />
 class="com.google.code.sshd.mac.HMACSHA1$Factory" />
 class="com.google.code.sshd.mac.HMACMD596$Factory" />
 class="com.google.code.sshd.mac.HMACSHA196$Factory" />

 
 
 
 

 
 
 
 
 
 
 
 
 
 
 
 
 
 



===
package org.apache.servicemix.kernel.gshell.core.sshd;

import java.util.Map;
import java.util.List;
import java.io.OutputStream;
import java.io.InputStream;
import java.io.Closeable;
import java.io.IOException;

import com.google.code.sshd.ShellFactory;
import com.google.code.sshd.shell.CrLfFilterInputStream;
import org.apache.geronimo.gshell.shell.ShellContext;
import org.apache.geronimo.gshell.io.IO;
import org.apache.geronimo.gshell.command.Variables;
import org.apache.geronimo.gshell.console.Console;
import 

Re: [Heads up] SSH server in java

2008-11-22 Thread Jason Dillon

Your limited is my "kick-ass amazing" :-P

--jason


On Nov 22, 2008, at 6:45 PM, Guillaume Nodet wrote:


Yes, i've refactored things a bit in the sshd project to make room for
the client side.
It's really limited for now and only support user/password
authentication and launching a shell.
I've implemented a gshell action at [1] for the client:

[1] 
https://svn.apache.org/repos/asf/servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/sshd/SshAction.java

On Sat, Nov 22, 2008 at 7:03 AM, Jason Dillon  
<[EMAIL PROTECTED]> wrote:
Cool, I'm going to start a gshell-ssh module under gshell-commands  
for the

sshd and ssh commands, which will replace the gshell-remote bits :-)

I noticed you got some client goo in there too... how is that  
working?


--jason


On Nov 21, 2008, at 3:29 PM, Guillaume Nodet wrote:


Yes, I've checked that in yesterday or so:

https://svn.apache.org/repos/asf/servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/sshd/

https://svn.apache.org/repos/asf/servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-remote.xml


On Fri, Nov 21, 2008 at 7:08 AM, Jason Dillon <[EMAIL PROTECTED] 
>

wrote:


Hey, do you have "org.apache.servicemix.kernel.gshell.core.sshd"  
checked

in
somewhere?

--jason


On Nov 13, 2008, at 5:58 AM, Guillaume Nodet wrote:

I've just done a real quick prototype to plug into smx kernel  
and I've
been able to log in into smx kernel using an ssh client and  
issue a

few commands.
Following is the class that does everything and the spring  
config to

start the ssh server.
The BogusPasswordAuthenticator is a dummy class which I pasted  
below

too.

Notice the use of stream filters to convert CR / CRLF stuff.  I  
think
this is because both sshd and the geronimo gshell do not handle  
well
the pty request and/or VT100 stuff.  But I'm still not sure  
where the

conversion should happen exactly.

Also note that i've redefined the ConsoleErrorHandlerImpl,  
because the
default one uses the application.getIO() for displaying errors  
so they

are not available remotely.

Let me know what you think, but it basically makes the whole  
remote

bits of gshell unused.
I have not implemented the ssh command which should be easy  
using jsch

lib.

Let me know if / how I can help you with that bits.

==
package org.apache.servicemix.kernel.gshell.core.sshd;

import com.google.code.sshd.PasswordAuthenticator;

public class BogusPasswordAuthenticator implements  
PasswordAuthenticator

{

public Object authenticate(String username, String password) {
   return (username != null && username.equals(password)) ?
username : null;
}
}


==

   
   
   class 
= 
"org 
.apache.servicemix.kernel.gshell.core.sshd.GShellShellFactory">

   
   
   
   
   
   
   
   
   
   
   
   
   
   
   class 
="org.apache.geronimo.gshell.wisdom.shell.ConsolePrompterImpl">

   
   
   
   
   
   
   class="com.google.code.sshd.hostkeys.FileHostKeyProvider">

   
   
   ${hostKey}
   
   
   
   
   
   
   class 
= 
"org 
.apache 
.servicemix.kernel.gshell.core.sshd.BogusPasswordAuthenticator"

/>
   
   
   
   
   
   
   
   
   
   
   
/>
   
   
   
/>
   
/>
   
   
   
   
   class="com.google.code.sshd.compression.CompressionNone 
$Factory" />

   
   
   
   
   
   
   
   
   
   class="com.google.code.sshd.mac.HMACMD5$Factory" />
   class="com.google.code.sshd.mac.HMACSHA1$Factory" />
   class="com.google.code.sshd.mac.HMACMD596$Factory" />
   class="com.google.code.sshd.mac.HMACSHA196$Factory" />

   
   
   
   

   
   
   
   
   
   
   
   
   
   
   
   
   




===
package org.apache.servicemix.kernel.gshell.core.sshd;

import java.util.Map;
import java.util.List;
import java.io.OutputStream;
import java.io.InputStream;
import java.io.Closeable;
import java.io.IOException;

import com.google.code.sshd.ShellFactory;
import com.google.code.sshd.shell.CrLfFilterInputStream;
import org.apache.geronimo.gshell.shell.ShellContext;
import org.apache.geronimo.gshell.io.IO;
import org.apache.geronimo.gshell.command.Variables;
import org.apache.geronimo.gshell.console.Console;
import org.apache.geronimo.gshell.console.JLineConsole;
import  
org.apache.geronimo.gshell.console.completer.AggregateCompleter;

import 

Re: [Heads up] SSH server in java

2008-11-22 Thread Guillaume Nodet
On Sat, Nov 22, 2008 at 7:32 AM, Jason Dillon <[EMAIL PROTECTED]> wrote:
> Any idea what this means:
>
> 
> Bliss:Applications jason$ ssh localhost -p 8081
> [EMAIL PROTECTED]'s password:
> channel_by_id: 1: bad id: channel free
> channel_input_success_failure: 1: unknown
> channel_by_id: 1: bad id: channel free
> channel_input_success_failure: 1: unknown
> 
>
> This is from "OpenSSH_5.1p1, OpenSSL 0.9.7l 28 Sep 2006" on Mac OS X.  It
> does connect and seems to work well.  Though seems to not handle sending
> over exceptions, like when a command is not resolved.  But I might look into
> that some more later today.

Not sure what those lines mean.  When I connect using OpenSSH and
launch a bad command in ServiceMix, I can see the usual output from
gshell on stderr with the ansi colors.

> Whats the status of the SSH work, any release on the horizon?  I'm sold on
> this for the GShell remoting direction, and really this is what I wanted
> from the start.  So I'd like to drop the other whisper/remoting muck and
> just use this.

There are still lots of things to do, but i think i could release a
0.1 very soon.
Btw, this project should soon move into Apache as a Mina subproject,
but I will do a release before that at google so that we can embed it.

> Your thoughts?
>
> --jason
>
>
> On Nov 13, 2008, at 5:58 AM, Guillaume Nodet wrote:
>
>> I've just done a real quick prototype to plug into smx kernel and I've
>> been able to log in into smx kernel using an ssh client and issue a
>> few commands.
>> Following is the class that does everything and the spring config to
>> start the ssh server.
>> The BogusPasswordAuthenticator is a dummy class which I pasted below too.
>>
>> Notice the use of stream filters to convert CR / CRLF stuff.  I think
>> this is because both sshd and the geronimo gshell do not handle well
>> the pty request and/or VT100 stuff.  But I'm still not sure where the
>> conversion should happen exactly.
>>
>> Also note that i've redefined the ConsoleErrorHandlerImpl, because the
>> default one uses the application.getIO() for displaying errors so they
>> are not available remotely.
>>
>> Let me know what you think, but it basically makes the whole remote
>> bits of gshell unused.
>> I have not implemented the ssh command which should be easy using jsch
>> lib.
>>
>> Let me know if / how I can help you with that bits.
>>
>> ==
>> package org.apache.servicemix.kernel.gshell.core.sshd;
>>
>> import com.google.code.sshd.PasswordAuthenticator;
>>
>> public class BogusPasswordAuthenticator implements PasswordAuthenticator {
>>
>>   public Object authenticate(String username, String password) {
>>   return (username != null && username.equals(password)) ?
>> username : null;
>>   }
>> }
>>
>>
>> ==
>>   > init-method="start" destroy-method="stop">
>>   
>>   
>>   > class="org.apache.servicemix.kernel.gshell.core.sshd.GShellShellFactory">
>>   
>>   
>>   
>>   
>>   
>>   
>>   
>>   
>>   
>>   > class="org.apache.geronimo.gshell.wisdom.shell.HistoryImpl">
>>   
>>   
>>   
>>   
>>   > class="org.apache.geronimo.gshell.wisdom.shell.ConsolePrompterImpl">
>>   
>>   
>>   
>>   
>>   
>>   
>>   
>>   
>>   
>>   ${hostKey}
>>   
>>   
>>   
>>   
>>   
>>   
>>   >
>> class="org.apache.servicemix.kernel.gshell.core.sshd.BogusPasswordAuthenticator"
>> />
>>   
>>   
>>   
>>   
>>   
>>   > class="com.google.code.sshd.channel.ChannelSession$Factory" />
>>   
>>   
>>   
>>   
>>   > />
>>   > class="com.google.code.sshd.cipher.TripleDESCBC$Factory" />
>>   > class="com.google.code.sshd.cipher.BlowfishCBC$Factory" />
>>   > />
>>   > />
>>   
>>   
>>   
>>   
>>   > class="com.google.code.sshd.compression.CompressionNone$Factory" />
>>   
>>   
>>   
>>   
>>   
>>   
>>   
>>   
>>   
>>   
>>   
>>   
>>   
>>   
>>   
>>   
>>   
>>   
>>   
>>   
>>   > class="com.google.code.sshd.auth.UserAuthPublicKey$Factory" />
>>   > class="com.google.code.sshd.auth.UserAuthPassword$Factory" />
>>   
>>   
>>   
>>   
>>   > class="com.google.code.sshd.signature.SignatureDSA$Factory" />
>>   > 

Re: [Heads up] SSH server in java

2008-11-22 Thread Guillaume Nodet
Yes, i've refactored things a bit in the sshd project to make room for
the client side.
It's really limited for now and only support user/password
authentication and launching a shell.
I've implemented a gshell action at [1] for the client:

[1] 
https://svn.apache.org/repos/asf/servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/sshd/SshAction.java

On Sat, Nov 22, 2008 at 7:03 AM, Jason Dillon <[EMAIL PROTECTED]> wrote:
> Cool, I'm going to start a gshell-ssh module under gshell-commands for the
> sshd and ssh commands, which will replace the gshell-remote bits :-)
>
> I noticed you got some client goo in there too... how is that working?
>
> --jason
>
>
> On Nov 21, 2008, at 3:29 PM, Guillaume Nodet wrote:
>
>> Yes, I've checked that in yesterday or so:
>>
>> https://svn.apache.org/repos/asf/servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/sshd/
>>
>> https://svn.apache.org/repos/asf/servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-remote.xml
>>
>>
>> On Fri, Nov 21, 2008 at 7:08 AM, Jason Dillon <[EMAIL PROTECTED]>
>> wrote:
>>>
>>> Hey, do you have "org.apache.servicemix.kernel.gshell.core.sshd" checked
>>> in
>>> somewhere?
>>>
>>> --jason
>>>
>>>
>>> On Nov 13, 2008, at 5:58 AM, Guillaume Nodet wrote:
>>>
 I've just done a real quick prototype to plug into smx kernel and I've
 been able to log in into smx kernel using an ssh client and issue a
 few commands.
 Following is the class that does everything and the spring config to
 start the ssh server.
 The BogusPasswordAuthenticator is a dummy class which I pasted below
 too.

 Notice the use of stream filters to convert CR / CRLF stuff.  I think
 this is because both sshd and the geronimo gshell do not handle well
 the pty request and/or VT100 stuff.  But I'm still not sure where the
 conversion should happen exactly.

 Also note that i've redefined the ConsoleErrorHandlerImpl, because the
 default one uses the application.getIO() for displaying errors so they
 are not available remotely.

 Let me know what you think, but it basically makes the whole remote
 bits of gshell unused.
 I have not implemented the ssh command which should be easy using jsch
 lib.

 Let me know if / how I can help you with that bits.

 ==
 package org.apache.servicemix.kernel.gshell.core.sshd;

 import com.google.code.sshd.PasswordAuthenticator;

 public class BogusPasswordAuthenticator implements PasswordAuthenticator
 {

  public Object authenticate(String username, String password) {
 return (username != null && username.equals(password)) ?
 username : null;
  }
 }


 ==
  >>> init-method="start" destroy-method="stop">
 
 
 >>>
 class="org.apache.servicemix.kernel.gshell.core.sshd.GShellShellFactory">
 
 
 
 
 
 
 
 
 
 >>> class="org.apache.geronimo.gshell.wisdom.shell.HistoryImpl">
 
 
 
 
 >>> class="org.apache.geronimo.gshell.wisdom.shell.ConsolePrompterImpl">
 
 
 
 
 
 
 
 
 
 ${hostKey}
 
 
 
 
 
 
 >>>

 class="org.apache.servicemix.kernel.gshell.core.sshd.BogusPasswordAuthenticator"
 />
 
 
 
 
 
 >>> class="com.google.code.sshd.channel.ChannelSession$Factory" />
 
 
 
 
 >>> />
 >>> class="com.google.code.sshd.cipher.TripleDESCBC$Factory" />
 >>> class="com.google.code.sshd.cipher.BlowfishCBC$Factory" />
 >>> />
 >>> />
 
 
 
 
 >>> class="com.google.code.sshd.compression.CompressionNone$Factory" />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 >>> class="com.google.code.sshd.auth.UserAuthPublicKey$Factory" />
 >>> class="com.google.code.sshd.auth.UserAuthPassword$Factory" />
 
 
 

Re: [Heads up] SSH server in java

2008-11-21 Thread Jason Dillon

Any idea what this means:


Bliss:Applications jason$ ssh localhost -p 8081
[EMAIL PROTECTED]'s password:
channel_by_id: 1: bad id: channel free
channel_input_success_failure: 1: unknown
channel_by_id: 1: bad id: channel free
channel_input_success_failure: 1: unknown


This is from "OpenSSH_5.1p1, OpenSSL 0.9.7l 28 Sep 2006" on Mac OS X.   
It does connect and seems to work well.  Though seems to not handle  
sending over exceptions, like when a command is not resolved.  But I  
might look into that some more later today.


Whats the status of the SSH work, any release on the horizon?  I'm  
sold on this for the GShell remoting direction, and really this is  
what I wanted from the start.  So I'd like to drop the other whisper/ 
remoting muck and just use this.


Your thoughts?

--jason


On Nov 13, 2008, at 5:58 AM, Guillaume Nodet wrote:


I've just done a real quick prototype to plug into smx kernel and I've
been able to log in into smx kernel using an ssh client and issue a
few commands.
Following is the class that does everything and the spring config to
start the ssh server.
The BogusPasswordAuthenticator is a dummy class which I pasted below  
too.


Notice the use of stream filters to convert CR / CRLF stuff.  I think
this is because both sshd and the geronimo gshell do not handle well
the pty request and/or VT100 stuff.  But I'm still not sure where the
conversion should happen exactly.

Also note that i've redefined the ConsoleErrorHandlerImpl, because the
default one uses the application.getIO() for displaying errors so they
are not available remotely.

Let me know what you think, but it basically makes the whole remote
bits of gshell unused.
I have not implemented the ssh command which should be easy using  
jsch lib.


Let me know if / how I can help you with that bits.

==
package org.apache.servicemix.kernel.gshell.core.sshd;

import com.google.code.sshd.PasswordAuthenticator;

public class BogusPasswordAuthenticator implements  
PasswordAuthenticator {


   public Object authenticate(String username, String password) {
   return (username != null && username.equals(password)) ?
username : null;
   }
}


==
   
   
   
   class 
="org.apache.servicemix.kernel.gshell.core.sshd.GShellShellFactory">

   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   class="com.google.code.sshd.hostkeys.FileHostKeyProvider">

   
   
   ${hostKey}
   
   
   
   
   
   
   class 
= 
"org 
.apache.servicemix.kernel.gshell.core.sshd.BogusPasswordAuthenticator"

/>
   
   
   
   
   
   
   
   
   
   
   

   
   
   
   

   
   
   
   
   
   
   
   
   
   
   
   
   
   
   class="com.google.code.sshd.mac.HMACMD5$Factory" />
   class="com.google.code.sshd.mac.HMACSHA1$Factory" />
   class="com.google.code.sshd.mac.HMACMD596$Factory" />
   class="com.google.code.sshd.mac.HMACSHA196$Factory" />

   
   
   
   

   
   
   
   
   
   
   
   
   
   
   
   
   
   



===
package org.apache.servicemix.kernel.gshell.core.sshd;

import java.util.Map;
import java.util.List;
import java.io.OutputStream;
import java.io.InputStream;
import java.io.Closeable;
import java.io.IOException;

import com.google.code.sshd.ShellFactory;
import com.google.code.sshd.shell.CrLfFilterInputStream;
import org.apache.geronimo.gshell.shell.ShellContext;
import org.apache.geronimo.gshell.io.IO;
import org.apache.geronimo.gshell.command.Variables;
import org.apache.geronimo.gshell.console.Console;
import org.apache.geronimo.gshell.console.JLineConsole;
import  
org.apache.geronimo.gshell.console.completer.AggregateCompleter;

import org.apache.geronimo.gshell.notification.ExitNotification;
import org.apache.geronimo.gshell.notification.ErrorNotification;
import org.apache.geronimo.gshell.application.model.Branding;
import org.apache.geronimo.gshell.commandline.CommandLineExecutor;
import org.apache.geronimo.gshell.ansi.AnsiRenderer;
import org.slf4j.LoggerFactory;
import org.slf4j.Logger;
import jline.History;
import jline.Completor;

public class 

Re: [Heads up] SSH server in java

2008-11-21 Thread Jason Dillon
Cool, I'm going to start a gshell-ssh module under gshell-commands for  
the sshd and ssh commands, which will replace the gshell-remote bits :-)


I noticed you got some client goo in there too... how is that working?

--jason


On Nov 21, 2008, at 3:29 PM, Guillaume Nodet wrote:


Yes, I've checked that in yesterday or so:
https://svn.apache.org/repos/asf/servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/sshd/
https://svn.apache.org/repos/asf/servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-remote.xml


On Fri, Nov 21, 2008 at 7:08 AM, Jason Dillon  
<[EMAIL PROTECTED]> wrote:
Hey, do you have "org.apache.servicemix.kernel.gshell.core.sshd"  
checked in

somewhere?

--jason


On Nov 13, 2008, at 5:58 AM, Guillaume Nodet wrote:

I've just done a real quick prototype to plug into smx kernel and  
I've

been able to log in into smx kernel using an ssh client and issue a
few commands.
Following is the class that does everything and the spring config to
start the ssh server.
The BogusPasswordAuthenticator is a dummy class which I pasted  
below too.


Notice the use of stream filters to convert CR / CRLF stuff.  I  
think

this is because both sshd and the geronimo gshell do not handle well
the pty request and/or VT100 stuff.  But I'm still not sure where  
the

conversion should happen exactly.

Also note that i've redefined the ConsoleErrorHandlerImpl, because  
the
default one uses the application.getIO() for displaying errors so  
they

are not available remotely.

Let me know what you think, but it basically makes the whole remote
bits of gshell unused.
I have not implemented the ssh command which should be easy using  
jsch

lib.

Let me know if / how I can help you with that bits.

==
package org.apache.servicemix.kernel.gshell.core.sshd;

import com.google.code.sshd.PasswordAuthenticator;

public class BogusPasswordAuthenticator implements  
PasswordAuthenticator {


 public Object authenticate(String username, String password) {
 return (username != null && username.equals(password)) ?
username : null;
 }
}


==
 
 
 
 class 
="org.apache.servicemix.kernel.gshell.core.sshd.GShellShellFactory">

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 class="com.google.code.sshd.hostkeys.FileHostKeyProvider">

 
 
 ${hostKey}
 
 
 
 
 
 
 class 
= 
"org 
.apache 
.servicemix.kernel.gshell.core.sshd.BogusPasswordAuthenticator"

/>
 
 
 
 
 
 
 
 
 
 
 
/>
 
 
 
/>
 
/>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 class="com.google.code.sshd.mac.HMACMD5$Factory" />
 class="com.google.code.sshd.mac.HMACSHA1$Factory" />
 class="com.google.code.sshd.mac.HMACMD596$Factory" />
 class="com.google.code.sshd.mac.HMACSHA196$Factory" />

 
 
 
 

 
 
 
 
 
 
 
 
 
 
 
 
 
 



===
package org.apache.servicemix.kernel.gshell.core.sshd;

import java.util.Map;
import java.util.List;
import java.io.OutputStream;
import java.io.InputStream;
import java.io.Closeable;
import java.io.IOException;

import com.google.code.sshd.ShellFactory;
import com.google.code.sshd.shell.CrLfFilterInputStream;
import org.apache.geronimo.gshell.shell.ShellContext;
import org.apache.geronimo.gshell.io.IO;
import org.apache.geronimo.gshell.command.Variables;
import org.apache.geronimo.gshell.console.Console;
import org.apache.geronimo.gshell.console.JLineConsole;
import  
org.apache.geronimo.gshell.console.completer.AggregateCompleter;

import org.apache.geronimo.gshell.notification.ExitNotification;
import org.apache.geronimo.gshell.notification.ErrorNotification;
import org.apache.geronimo.gshell.application.model.Branding;
import org.apache.geronimo.gshell.commandline.CommandLineExecutor;
import org.apache.geronimo.gshell.ansi.AnsiRenderer;
import org.slf4j.LoggerFactory;
import org.slf4j.Logger;
import jline.History;
import jline.Completor;

public class GShellShellFactory implements ShellFactory {

 private Logger logger = LoggerFactory.getLogger(getClass());
 private Branding branding;
 private Console.Prompter prompter;
 private 

Re: [Heads up] SSH server in java

2008-11-21 Thread Guillaume Nodet
Yes, I've checked that in yesterday or so:
 
https://svn.apache.org/repos/asf/servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/sshd/
 
https://svn.apache.org/repos/asf/servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-remote.xml


On Fri, Nov 21, 2008 at 7:08 AM, Jason Dillon <[EMAIL PROTECTED]> wrote:
> Hey, do you have "org.apache.servicemix.kernel.gshell.core.sshd" checked in
> somewhere?
>
> --jason
>
>
> On Nov 13, 2008, at 5:58 AM, Guillaume Nodet wrote:
>
>> I've just done a real quick prototype to plug into smx kernel and I've
>> been able to log in into smx kernel using an ssh client and issue a
>> few commands.
>> Following is the class that does everything and the spring config to
>> start the ssh server.
>> The BogusPasswordAuthenticator is a dummy class which I pasted below too.
>>
>> Notice the use of stream filters to convert CR / CRLF stuff.  I think
>> this is because both sshd and the geronimo gshell do not handle well
>> the pty request and/or VT100 stuff.  But I'm still not sure where the
>> conversion should happen exactly.
>>
>> Also note that i've redefined the ConsoleErrorHandlerImpl, because the
>> default one uses the application.getIO() for displaying errors so they
>> are not available remotely.
>>
>> Let me know what you think, but it basically makes the whole remote
>> bits of gshell unused.
>> I have not implemented the ssh command which should be easy using jsch
>> lib.
>>
>> Let me know if / how I can help you with that bits.
>>
>> ==
>> package org.apache.servicemix.kernel.gshell.core.sshd;
>>
>> import com.google.code.sshd.PasswordAuthenticator;
>>
>> public class BogusPasswordAuthenticator implements PasswordAuthenticator {
>>
>>   public Object authenticate(String username, String password) {
>>   return (username != null && username.equals(password)) ?
>> username : null;
>>   }
>> }
>>
>>
>> ==
>>   > init-method="start" destroy-method="stop">
>>   
>>   
>>   > class="org.apache.servicemix.kernel.gshell.core.sshd.GShellShellFactory">
>>   
>>   
>>   
>>   
>>   
>>   
>>   
>>   
>>   
>>   > class="org.apache.geronimo.gshell.wisdom.shell.HistoryImpl">
>>   
>>   
>>   
>>   
>>   > class="org.apache.geronimo.gshell.wisdom.shell.ConsolePrompterImpl">
>>   
>>   
>>   
>>   
>>   
>>   
>>   
>>   
>>   
>>   ${hostKey}
>>   
>>   
>>   
>>   
>>   
>>   
>>   >
>> class="org.apache.servicemix.kernel.gshell.core.sshd.BogusPasswordAuthenticator"
>> />
>>   
>>   
>>   
>>   
>>   
>>   > class="com.google.code.sshd.channel.ChannelSession$Factory" />
>>   
>>   
>>   
>>   
>>   > />
>>   > class="com.google.code.sshd.cipher.TripleDESCBC$Factory" />
>>   > class="com.google.code.sshd.cipher.BlowfishCBC$Factory" />
>>   > />
>>   > />
>>   
>>   
>>   
>>   
>>   > class="com.google.code.sshd.compression.CompressionNone$Factory" />
>>   
>>   
>>   
>>   
>>   
>>   
>>   
>>   
>>   
>>   
>>   
>>   
>>   
>>   
>>   
>>   
>>   
>>   
>>   
>>   
>>   > class="com.google.code.sshd.auth.UserAuthPublicKey$Factory" />
>>   > class="com.google.code.sshd.auth.UserAuthPassword$Factory" />
>>   
>>   
>>   
>>   
>>   > class="com.google.code.sshd.signature.SignatureDSA$Factory" />
>>   > class="com.google.code.sshd.signature.SignatureRSA$Factory" />
>>   
>>   
>>   
>>
>>
>>
>> ===
>> package org.apache.servicemix.kernel.gshell.core.sshd;
>>
>> import java.util.Map;
>> import java.util.List;
>> import java.io.OutputStream;
>> import java.io.InputStream;
>> import java.io.Closeable;
>> import java.io.IOException;
>>
>> import com.google.code.sshd.ShellFactory;
>> import com.google.code.sshd.shell.CrLfFilterInputStream;
>> import org.apache.geronimo.gshell.shell.ShellContext;
>> import org.apache.geronimo.gshell.io.IO;
>> import org.apache.geronimo.gshell.command.Variables;
>> import org.apache.geronimo.gshell.console.Console;
>> import org.apache.geronimo.gshell.console.JLineConsole;
>> import 

Re: [Heads up] SSH server in java

2008-11-20 Thread Jason Dillon
Hey, do you have "org.apache.servicemix.kernel.gshell.core.sshd"  
checked in somewhere?


--jason


On Nov 13, 2008, at 5:58 AM, Guillaume Nodet wrote:


I've just done a real quick prototype to plug into smx kernel and I've
been able to log in into smx kernel using an ssh client and issue a
few commands.
Following is the class that does everything and the spring config to
start the ssh server.
The BogusPasswordAuthenticator is a dummy class which I pasted below  
too.


Notice the use of stream filters to convert CR / CRLF stuff.  I think
this is because both sshd and the geronimo gshell do not handle well
the pty request and/or VT100 stuff.  But I'm still not sure where the
conversion should happen exactly.

Also note that i've redefined the ConsoleErrorHandlerImpl, because the
default one uses the application.getIO() for displaying errors so they
are not available remotely.

Let me know what you think, but it basically makes the whole remote
bits of gshell unused.
I have not implemented the ssh command which should be easy using  
jsch lib.


Let me know if / how I can help you with that bits.

==
package org.apache.servicemix.kernel.gshell.core.sshd;

import com.google.code.sshd.PasswordAuthenticator;

public class BogusPasswordAuthenticator implements  
PasswordAuthenticator {


   public Object authenticate(String username, String password) {
   return (username != null && username.equals(password)) ?
username : null;
   }
}


==
   
   
   
   class 
="org.apache.servicemix.kernel.gshell.core.sshd.GShellShellFactory">

   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   class="com.google.code.sshd.hostkeys.FileHostKeyProvider">

   
   
   ${hostKey}
   
   
   
   
   
   
   class 
= 
"org 
.apache.servicemix.kernel.gshell.core.sshd.BogusPasswordAuthenticator"

/>
   
   
   
   
   
   
   
   
   
   
   

   
   
   
   

   
   
   
   
   
   
   
   
   
   
   
   
   
   
   class="com.google.code.sshd.mac.HMACMD5$Factory" />
   class="com.google.code.sshd.mac.HMACSHA1$Factory" />
   class="com.google.code.sshd.mac.HMACMD596$Factory" />
   class="com.google.code.sshd.mac.HMACSHA196$Factory" />

   
   
   
   

   
   
   
   
   
   
   
   
   
   
   
   
   
   



===
package org.apache.servicemix.kernel.gshell.core.sshd;

import java.util.Map;
import java.util.List;
import java.io.OutputStream;
import java.io.InputStream;
import java.io.Closeable;
import java.io.IOException;

import com.google.code.sshd.ShellFactory;
import com.google.code.sshd.shell.CrLfFilterInputStream;
import org.apache.geronimo.gshell.shell.ShellContext;
import org.apache.geronimo.gshell.io.IO;
import org.apache.geronimo.gshell.command.Variables;
import org.apache.geronimo.gshell.console.Console;
import org.apache.geronimo.gshell.console.JLineConsole;
import  
org.apache.geronimo.gshell.console.completer.AggregateCompleter;

import org.apache.geronimo.gshell.notification.ExitNotification;
import org.apache.geronimo.gshell.notification.ErrorNotification;
import org.apache.geronimo.gshell.application.model.Branding;
import org.apache.geronimo.gshell.commandline.CommandLineExecutor;
import org.apache.geronimo.gshell.ansi.AnsiRenderer;
import org.slf4j.LoggerFactory;
import org.slf4j.Logger;
import jline.History;
import jline.Completor;

public class GShellShellFactory implements ShellFactory {

   private Logger logger = LoggerFactory.getLogger(getClass());
   private Branding branding;
   private Console.Prompter prompter;
   private CommandLineExecutor executor;
   private History history;
   private List completers;

   public Branding getBranding() {
   return branding;
   }

   public void setBranding(Branding branding) {
   this.branding = branding;
   }

   public Console.Prompter getPrompter() {
   return prompter;
   }

   public void setPrompter(Console.Prompter prompter) {
   this.prompter = prompter;
   }

   public CommandLineExecutor getExecutor() {
   return executor;
   }

   public void 

Re: [Heads up] SSH server in java

2008-11-13 Thread Jason Dillon
Fricken awesome!  I'd be more than happy to make the gshell remoting  
stuff go away in favor of using ssh ;-)  I will take a closer look at  
this in the next day or so.  I'm very excited by this work!


--jason


On Nov 13, 2008, at 5:58 AM, Guillaume Nodet wrote:


I've just done a real quick prototype to plug into smx kernel and I've
been able to log in into smx kernel using an ssh client and issue a
few commands.
Following is the class that does everything and the spring config to
start the ssh server.
The BogusPasswordAuthenticator is a dummy class which I pasted below  
too.


Notice the use of stream filters to convert CR / CRLF stuff.  I think
this is because both sshd and the geronimo gshell do not handle well
the pty request and/or VT100 stuff.  But I'm still not sure where the
conversion should happen exactly.

Also note that i've redefined the ConsoleErrorHandlerImpl, because the
default one uses the application.getIO() for displaying errors so they
are not available remotely.

Let me know what you think, but it basically makes the whole remote
bits of gshell unused.
I have not implemented the ssh command which should be easy using  
jsch lib.


Let me know if / how I can help you with that bits.

==
package org.apache.servicemix.kernel.gshell.core.sshd;

import com.google.code.sshd.PasswordAuthenticator;

public class BogusPasswordAuthenticator implements  
PasswordAuthenticator {


   public Object authenticate(String username, String password) {
   return (username != null && username.equals(password)) ?
username : null;
   }
}


==
   
   
   
   class 
="org.apache.servicemix.kernel.gshell.core.sshd.GShellShellFactory">

   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   class="com.google.code.sshd.hostkeys.FileHostKeyProvider">

   
   
   ${hostKey}
   
   
   
   
   
   
   class 
= 
"org 
.apache.servicemix.kernel.gshell.core.sshd.BogusPasswordAuthenticator"

/>
   
   
   
   
   
   
   
   
   
   
   

   
   
   
   

   
   
   
   
   
   
   
   
   
   
   
   
   
   
   class="com.google.code.sshd.mac.HMACMD5$Factory" />
   class="com.google.code.sshd.mac.HMACSHA1$Factory" />
   class="com.google.code.sshd.mac.HMACMD596$Factory" />
   class="com.google.code.sshd.mac.HMACSHA196$Factory" />

   
   
   
   

   
   
   
   
   
   
   
   
   
   
   
   
   
   



===
package org.apache.servicemix.kernel.gshell.core.sshd;

import java.util.Map;
import java.util.List;
import java.io.OutputStream;
import java.io.InputStream;
import java.io.Closeable;
import java.io.IOException;

import com.google.code.sshd.ShellFactory;
import com.google.code.sshd.shell.CrLfFilterInputStream;
import org.apache.geronimo.gshell.shell.ShellContext;
import org.apache.geronimo.gshell.io.IO;
import org.apache.geronimo.gshell.command.Variables;
import org.apache.geronimo.gshell.console.Console;
import org.apache.geronimo.gshell.console.JLineConsole;
import  
org.apache.geronimo.gshell.console.completer.AggregateCompleter;

import org.apache.geronimo.gshell.notification.ExitNotification;
import org.apache.geronimo.gshell.notification.ErrorNotification;
import org.apache.geronimo.gshell.application.model.Branding;
import org.apache.geronimo.gshell.commandline.CommandLineExecutor;
import org.apache.geronimo.gshell.ansi.AnsiRenderer;
import org.slf4j.LoggerFactory;
import org.slf4j.Logger;
import jline.History;
import jline.Completor;

public class GShellShellFactory implements ShellFactory {

   private Logger logger = LoggerFactory.getLogger(getClass());
   private Branding branding;
   private Console.Prompter prompter;
   private CommandLineExecutor executor;
   private History history;
   private List completers;

   public Branding getBranding() {
   return branding;
   }

   public void setBranding(Branding branding) {
   this.branding = branding;
   }

   public Console.Prompter getPrompter() {
   return prompter;
   }

   public void setPrompter(Console.Prompter prompter) {
   this.prompter = prompter;
  

Re: [Heads up] SSH server in java

2008-11-12 Thread Guillaume Nodet
I've just done a real quick prototype to plug into smx kernel and I've
been able to log in into smx kernel using an ssh client and issue a
few commands.
Following is the class that does everything and the spring config to
start the ssh server.
The BogusPasswordAuthenticator is a dummy class which I pasted below too.

Notice the use of stream filters to convert CR / CRLF stuff.  I think
this is because both sshd and the geronimo gshell do not handle well
the pty request and/or VT100 stuff.  But I'm still not sure where the
conversion should happen exactly.

Also note that i've redefined the ConsoleErrorHandlerImpl, because the
default one uses the application.getIO() for displaying errors so they
are not available remotely.

Let me know what you think, but it basically makes the whole remote
bits of gshell unused.
I have not implemented the ssh command which should be easy using jsch lib.

Let me know if / how I can help you with that bits.

==
package org.apache.servicemix.kernel.gshell.core.sshd;

import com.google.code.sshd.PasswordAuthenticator;

public class BogusPasswordAuthenticator implements PasswordAuthenticator {

public Object authenticate(String username, String password) {
return (username != null && username.equals(password)) ?
username : null;
}
}


==




























${hostKey}





























































===
package org.apache.servicemix.kernel.gshell.core.sshd;

import java.util.Map;
import java.util.List;
import java.io.OutputStream;
import java.io.InputStream;
import java.io.Closeable;
import java.io.IOException;

import com.google.code.sshd.ShellFactory;
import com.google.code.sshd.shell.CrLfFilterInputStream;
import org.apache.geronimo.gshell.shell.ShellContext;
import org.apache.geronimo.gshell.io.IO;
import org.apache.geronimo.gshell.command.Variables;
import org.apache.geronimo.gshell.console.Console;
import org.apache.geronimo.gshell.console.JLineConsole;
import org.apache.geronimo.gshell.console.completer.AggregateCompleter;
import org.apache.geronimo.gshell.notification.ExitNotification;
import org.apache.geronimo.gshell.notification.ErrorNotification;
import org.apache.geronimo.gshell.application.model.Branding;
import org.apache.geronimo.gshell.commandline.CommandLineExecutor;
import org.apache.geronimo.gshell.ansi.AnsiRenderer;
import org.slf4j.LoggerFactory;
import org.slf4j.Logger;
import jline.History;
import jline.Completor;

public class GShellShellFactory implements ShellFactory {

private Logger logger = LoggerFactory.getLogger(getClass());
private Branding branding;
private Console.Prompter prompter;
private CommandLineExecutor executor;
private History history;
private List completers;

public Branding getBranding() {
return branding;
}

public void setBranding(Branding branding) {
this.branding = branding;
}

public Console.Prompter getPrompter() {
return prompter;
}

public void setPrompter(Console.Prompter prompter) {
this.prompter = prompter;
}

public CommandLineExecutor getExecutor() {
return executor;
}

public void setExecutor(CommandLineExecutor executor) {
this.executor = executor;
}

public History getHistory() {
return history;
}

public void setHistory(History history) {
this.history = history;
}

public List getCompleters() {
return completers;
}

public void setCompleters(List completers) {
this.completers = completers;
}

public Shell createShell() {
return new ShellImpl();
}

public class ShellImpl implements 

Re: [Heads up] SSH server in java

2008-11-10 Thread Jason Dillon

How does one hook up GShell to use this stuff?

--jason


On Nov 7, 2008, at 4:22 AM, Guillaume Nodet wrote:


Over the past days, I've been working on a implementing a SSH server
in java to replace to gshell remoting bits.
The project is currently hosted at google code:
 http://code.google.com/p/sshd/

This project is based on Mina and the current status is that the ssh
protocol is in a working state, but there are still a lots of things
to iron.
I've been able to connect using openssh 5.0 and 5.1 and also jsch
(from which i borrowed from code btw) and launch an /bin/sh shell and
issue a few commands.
I'd be happy if any committer is interested to work on that to give
him commits rights on the project.

--
Cheers,
Guillaume Nodet

Blog: http://gnodet.blogspot.com/

Open Source SOA
http://fusesource.com




Re: [Heads up] SSH server in java

2008-11-09 Thread Chris Custine
Wow...  Just getting around to looking at this.  Nice work.

Chris

--
Chris Custine
My Blog :: http://blog.organicelement.com
Apache ServiceMix :: http://servicemix.apache.org
Apache Directory Server :: http://directory.apache.org


On Thu, Nov 6, 2008 at 2:22 PM, Guillaume Nodet <[EMAIL PROTECTED]> wrote:

> Over the past days, I've been working on a implementing a SSH server
> in java to replace to gshell remoting bits.
> The project is currently hosted at google code:
>  http://code.google.com/p/sshd/
>
> This project is based on Mina and the current status is that the ssh
> protocol is in a working state, but there are still a lots of things
> to iron.
> I've been able to connect using openssh 5.0 and 5.1 and also jsch
> (from which i borrowed from code btw) and launch an /bin/sh shell and
> issue a few commands.
> I'd be happy if any committer is interested to work on that to give
> him commits rights on the project.
>
> --
> Cheers,
> Guillaume Nodet
> 
> Blog: http://gnodet.blogspot.com/
> 
> Open Source SOA
> http://fusesource.com
>


Re: [Heads up] SSH server in java

2008-11-07 Thread Jason Dillon

This is fricken awesome!

--jason


On Nov 7, 2008, at 4:22 AM, Guillaume Nodet wrote:


Over the past days, I've been working on a implementing a SSH server
in java to replace to gshell remoting bits.
The project is currently hosted at google code:
 http://code.google.com/p/sshd/

This project is based on Mina and the current status is that the ssh
protocol is in a working state, but there are still a lots of things
to iron.
I've been able to connect using openssh 5.0 and 5.1 and also jsch
(from which i borrowed from code btw) and launch an /bin/sh shell and
issue a few commands.
I'd be happy if any committer is interested to work on that to give
him commits rights on the project.

--
Cheers,
Guillaume Nodet

Blog: http://gnodet.blogspot.com/

Open Source SOA
http://fusesource.com