[erlang-questions] how: connect to ssh_sshd with something else than OpenSSH client (including howto)

Michael Regen michael.regen@REDACTED
Fri Nov 9 04:13:53 CET 2007

Did anyone of you have success with connecing to ssh_sshd except with
the OpenSSH client?

After fiddling with ssh_sshd I managed to connect to it with my brave
OpenSSH client (Windows and Linux). Fine.
But every other ssh client I tried so far did not work:
With putty v 0.58 I could enter my user name and password, saw the
usual Erlang greetings and the prompt 1> and could not enter anything
although it looked like putty believed in a connection which can be
used. Turning on various echos, etc did not really help. There was
never a response from sshd.

With putty 0.60 I see an empty screen. No chance to enter any username, etc.

Since putty only supports xterm terminal emulation I tried the current
version of SecureCRT 5.5.3 which besides a lot of others, also
supports vt100. Same as with putty 0.58.

TeraTermPro (yes, the one which supports SSH2) simply disappears as
soon as you enter your password and press enter.

No idea where to get F-Secure SSH client for testing. I do not think
there are many actively developed ssh clients for the windows platform
left. At least not many you could expect at your customer's PCs. Did I
do something wrong or shouldn't we consider ssh_sshd as production

BTW it took me some time and browsing through the source code to make
ssh_sshd work. Maybe it helps someone else, this is what I did under

is right, the documentation is a bit terse. :)

First, create your private/public keys. ssh_sshd will not run and let
someone connect if you choose other file names or omit one of the keys
- as far as I saw. I am also wondering a bit why you have to create
keys for protocol version 1. I hope ssh1 is not supported, otherwise
we might want to have an option to turn it off.

ssh-keygen -t rsa1 -f ssh_host_key -C '' -N ''
ssh-keygen -f ssh_host_rsa_key -t rsa -N ''
ssh-keygen -f ssh_host_dsa_key -t dsa -N ''

% start erlang and then first the crypto server
% next start ssh_sshd on e.g.
{ok,SshPID} = ssh_sshd:listen({127,0,0,1}, 12345, [{system_dir,
"/directory/where/you/stored/your/keys"}, {user_passwords, [{"bob",

Of course you can also omit creating your own keys, make the keys in
/etc/ssh readable for the user who starts Erlang and omit the
system_dir parameter. But I guess this is not what you typically want.


More information about the erlang-questions mailing list