[erlang-questions] Replacing default shell in sshd

Ingela Anderton Andin <>
Tue Nov 11 10:24:31 CET 2008


Hi!

> I was looking at the ssh module because I was somewhat interested in  
> making a MUD in erlang that people can ssh into, but I can't quite  
> figure out how I should go about doing this.

> It appears that {shell, start, []} is the default shell, but when I  
> read the related source it had a lot of code dealing with shell  
> specific code, and I could not easily figure out exactly what messages  
> the ssh module expects it to respond to. Can anyone tell me exactly  
> what kind of behavior a replacement module requires for the ssh module  
> to work correctly?

I am afraid the ssh code is not very clean at the moment. It
has been subject to major refactoring leading up to ssh-1.0 version. Alas
due to other things getting higher priority the work with this was not
really completed and we where forced to make a somewhat "in between version"
as there where changes needed by customers that could not wait but no time to 
finish it properly. (Still called it 1.0 to reflect that it was a major change and the
API changed a lot). There are also a lot of code that is there to make it work
at least as well as before but can be really ugly and  confusing and
in some cases even wrong, so to speak bug compatible with the older version.
And of course a lot of code is there to still support the  old API to make the transistion 
smoother. Unfotunatly the old API had almost no documentation and was not written
by the OTP-team, so as far as we know latest ssh is backwards compatible.

I do not have a good short answer for you at the moment. There is an example
in ssh/exampels directory of a cli but I can not *guarantee *that It works or is
up to date. Maybe it can help a little. 

We are continuously working to improve the ssh application and as usual there
are also other things competing for our time so please have some patiences, it is
getting there.

> Furthermore, does anyone see anything that makes the ssh module  
> unsuitable for what I'd like to do?

Conceptually I see no problem, but maybe there are some inmprovements needed in
the ssh application before it will work smoothly.

> Also, just to point something out, when I start the ssh server, the  
> server will crash if I do not have DSA keys in the system directory.  
> Having RSA keys only does not work and, in fact, I am not certain the  
> daemon is capable of using RSA keys server side.

There might be a problem here we will look into it.

Regards Ingela Erlang/OTP - Ericsson








More information about the erlang-questions mailing list