ssh_sftp connection problem

Dmitriy Kargapolov <>
Thu May 4 22:40:07 CEST 2006


Hi,
I found that in ssh-0.9.1 ssh_sftp:connect/2,3 hangs in case when remote 
host is unknown. Supposedly it happens because:

1) internal ssh_cm:connect() call is implemented using 
gen_server:start_link:
connect(Host, Port, Opts) ->
     gen_server:start_link(?MODULE, [client, self(), Host, Port, Opts], []).
2) when ssh_cm:init() failed because of lookup/connect timeout, parent 
linked process is died as well, i.e. ssh_sftp:init() is died.

3) call call ssh_cm:connect() never ends, and calling process hangs.

To test just run ssh_sftp:connect(unexisting_host,[]).



More information about the erlang-questions mailing list