anchor.diff:  end_per_testcase(_TestCase, _Config) ->
       ssh:stop(),
       ok.
  +
  +
  +chk_key(Pgm, Name, File, Config) ->
  +    case ssh_test_lib:openssh_supports(Pgm, public_key, Name) of
  +	true ->
  +	    {skip,lists:concat(["openssh client does not support ",Name])};
  +	false ->
  +	    {ok,[[Home]]} = init:get_argument(home),
  +	    KeyFile =  filename:join(Home, File),
  +	    case file:read_file(KeyFile) of
  +		{ok, Pem} ->
  +		    case public_key:pem_decode(Pem) of
  +			[{_,_, not_encrypted}] ->
  +			    init_per_testcase('__default__',Config);
  +			_ ->
  +			    {skip, {error, "Has pass phrase can not be used by automated test case"}} 
  +		    end;
  +		_ ->
  +		    {skip, lists:concat(["no ~/",File])}  
  +	    end
  +    end.
   
   %%--------------------------------------------------------------------
   %% Test Cases --------------------------------------------------------
  
positive.code: erlang_client_openssh_server_publickey_dsa() ->
      [{doc, "Validate using dsa publickey."}].
  erlang_client_openssh_server_publickey_dsa(Config) when is_list(Config) ->
      {ok,[[Home]]} = init:get_argument(home),
      KeyFile =  filename:join(Home, ".ssh/id_dsa"),
      case file:read_file(KeyFile) of
  	{ok, Pem} ->
  	    case public_key:pem_decode(Pem) of
  		[{_,_, not_encrypted}] ->
  		    ConnectionRef =
  			ssh_test_lib:connect(?SSH_DEFAULT_PORT,
  					     [{public_key_alg, ssh_dsa},
  					      {user_interaction, false},
  					      silently_accept_hosts]),
  		    {ok, Channel} =
  			ssh_connection:session_channel(ConnectionRef, infinity),
  		    ok = ssh_connection:close(ConnectionRef, Channel),
  		    ok = ssh:close(ConnectionRef);
  		_ ->
  		    {skip, {error, "Has pass phrase can not be used by automated test case"}} 
  	    end;
  	_ ->
  	    {skip, "no ~/.ssh/id_dsa"}  
      end.
  %%--------------------------------------------------------------------
  erlang_server_openssh_client_public_key_dsa() ->
      [{doc, "Validate using dsa publickey."}].
  
negative.code:     UserDir = ?config(data_dir, Config),
      {error, Reason0} =
  	ssh:connect(any, ?SSH_DEFAULT_PORT, [{silently_accept_hosts, true},
  					     {user, "foo"},
  					     {password, "morot"},
  					     {user_interaction, false},
  					     {user_dir, UserDir}]),
      
      ct:log("Test of user foo that does not exist. "
  		       "Error msg: ~p~n", [Reason0]),
  