• java ssh server
    6 replies, posted
I need to be able to create a java ssh server system so that my program can accept ssh connections, then receive the data decrypt it and pass it onto the main processing system. I also need it to be multithreaded (1thread = 1connection). I would be willing to have to mod a current system or would be willing to create a system from the ground up provided i can be given teh correct information as to do it. --- my current thoughts regarding it: ssh default port is 22; ssh relies on public key encryption; would ssh be possible through a tcp connection? if so, it would have to be an emulated server? my ssh system must allow only text transfers, no file transfers or anything else; --- Any assistance in this is most welcome
Just to clarify: You want your program to listen on port 22, accept SSH connections, receive information through that SSH connection and then pass it onto another system?
You should probably use a library like [url=http://www.jcraft.com/jsch/]JSch[/url] rather than implementing the SSH protocol yourself. [editline]4th April 2011[/editline] Hmm, looks like JSch may be just a client, not a server. It'd be worth looking around for server implementations, though. If nothing else you could use JNI to wrap one written in C. Since SSH is a security-related protocol, bugs in the implementation are likely to result in security flaws. It's better to use an implementation that's been around for awhile and had time to have the bugs worked out, rather than writing your own. [editline]4th April 2011[/editline] Hey, you copied my avatar.
@nikimo, yes, that is fairly accurate... @wyzard, hmmm... i see... thanks, i will look into that... @wyzard, I found it on google images, lolz
[QUOTE=CountNoobula;29005992]@wyzard, I found it on google images, lolz[/QUOTE] It's actually part of the [url=http://tango.freedesktop.org/Tango_Icon_Library]Tango icon library[/url], so I'm not surprised.
You'll have to implement SSL and some crypto routines. And yes, SSH uses TCP. You can look for sample code (but probably not Java) in SSH honeypot servers, are they tend to implement the bare minimum of the protocol.
@q3k, thank you... this appears very, very useful :)
Sorry, you need to Log In to post a reply to this thread.