Reputation: 43
I would like to write my own implementation of a SSH daemon that is not based on OpenSSL. It shall be used in a non Linux-oid environment.
Is there any public domain source code for a SSH domain (probably not full-featured) available?
Upvotes: 2
Views: 11326
Reputation: 13690
There are already pointers to source code samples by emil and ghoti.
But I think to start such a project you should read the documentation of the underlying protocols.
Upvotes: 1
Reputation: 46886
A number of small SSH daemons exist that may be adaptable to your environment.
If your concern is about licensing, then pick example code that is not GPL, and you'll be free to do whatever you like with it. (Note that OpenSSH uses the BSD license, so you are free to do whatever you like with it.) Dropbear is a nice, small server that often gets used in embedded environments.
Also, check out Wikipedia's Comparison of SSH servers. It's not complete, but it provides some food for thought.
Upvotes: 1
Reputation: 1700
If your goal is to write your own daemon, can't you just read the source code of OpenSSH, if it is too complex, then you can maybe have a look on:
http://plan9.bell-labs.com/sources/contrib/blstuart/ssh/
I think this one is released under Lucent Public License Version and written i Plan 9 C, which is a little bit different to C89 or C99. But should be quite easy to understand.
http://www.gnu.org/licenses/license-list.html#lucent102
Or have a look on the Erlang implementation of SSH.
https://github.com/erlang/otp/tree/maint/lib/ssh/src
Good luck!
Upvotes: 1