anchor.diff:              [{_,[Ch1|_]}|_] = proplists:get_value(cipher, CommonAlgs),
   
               %% Make config file:
  -            Contents = 
  -                [{ssh, [{preferred_algorithms,
  -                         [{cipher, [Ch1]},
  -                          {kex,    [K1a]}
  -                         ] ++ AdjustClient},
  -                        {client_options,
  -                         [{modify_algorithms,
  -                           [{rm,     [{kex, [K1a]}]},
  -                            {append, [{kex, [K1b]}]}
  +            {ok,ConfFile} = 
  +                make_config_file_in_privdir(
  +                  "c2.config", Config,
  +                  [{ssh, [{preferred_algorithms,
  +                           [{cipher, [Ch1]},
  +                            {kex,    [K1a]}
  +                           ] ++ AdjustClient},
  +                          {client_options,
  +                           [{modify_algorithms,
  +                             [{rm,     [{kex, [K1a]}]},
  +                              {append, [{kex, [K1b]}]}
  +                             ]}
                              ]}
                            ]}
  -                       ]}
  -                ],          
  -            %% write the file:
  -            PrivDir = proplists:get_value(priv_dir, Config),
  -            ConfFile = filename:join(PrivDir,"c2.config"),
  -            {ok,D} = file:open(ConfFile, [write]),
  -            io:format(D, "~p.~n", [Contents]),
  -            file:close(D),
  -            {ok,Cnfs} = file:read_file(ConfFile),
  -            ct:log("c2.config:~n~s", [Cnfs]),
  +                  ]),
   
               %% Start the slave node with the configuration just made:
               {ok, Peer, Node} = ?CT_PEER(["-config", ConfFile]),
  
positive.code:             [{_,[Ch1|_]}|_] = proplists:get_value(cipher, CommonAlgs),
  
              %% Make config file:
              Contents = 
                  [{ssh, [{preferred_algorithms,
                           [{cipher, [Ch1]},
                            {kex,    [K1]}
                           ]},
                          {server_options,
                           [{modify_algorithms,
                             [{rm,     [{kex, [K1]}]},
                              {append, [{kex, [K2]}]}
                             ]}
                           ]},
                          {client_options,
                           [{modify_algorithms,
                             [{rm,     [{kex, [K1]}]},
                              {append, [{kex, [K3]}]}
                             ]}
                           ]}
                         ]}
                  ],          
              %% write the file:
              PrivDir = proplists:get_value(priv_dir, Config),
              ConfFile = filename:join(PrivDir,"c3.config"),
              {ok,D} = file:open(ConfFile, [write]),
              io:format(D, "~p.~n", [Contents]),
              file:close(D),
              {ok,Cnfs} = file:read_file(ConfFile),
              ct:log("c3.config:~n~s", [Cnfs]),
  
              %% Start the slave node with the configuration just made:
              {ok, Peer, Node} = ?CT_PEER(["-config", ConfFile]),
  
negative.code:     after 
  	10000 -> ct:fail("timeout ~p:~p",[?MODULE,?LINE])
      end.
  
  
  make_config_file_in_privdir(FileName, Config, Contents) ->
      %% write the file:
      PrivDir = proplists:get_value(priv_dir, Config),
      ConfFile = filename:join(PrivDir, FileName),
      {ok,D} = file:open(ConfFile, [write]),
      io:format(D, "~p.~n", [Contents]),
      file:close(D),
      {ok,Cnfs} = file:read_file(ConfFile),
      ct:log("Config file ~p :~n~s", [ConfFile,Cnfs]),
      {ok,ConfFile}.
  
  
  get_preferred_algorithms(Pid, Type) ->
      {ok,#{preferred_algorithms:=As}} = ssh_system_sup:get_acceptor_options(Pid),
      proplists:get_value(Type, As).
  
  test_connection(C) ->
      {ok, Ch} = ssh_connection:session_channel(C, infinity),
      A = rand:uniform(100),
      B = rand:uniform(100),
      A_plus_B = lists:concat([A,"+",B,"."]),
      Sum = integer_to_binary(A+B),
      success = ssh_connection:exec(C, Ch, A_plus_B, infinity),
      expected = ssh_test_lib:receive_exec_result(
                   {ssh_cm, C, {data, Ch, 0, Sum}} ),
      ssh_test_lib:receive_exec_end(C, Ch),
      ok.
  
  test_not_connect(Config, Host, Port, Opts) ->
      try
          ssh_test_lib:std_connect(Config, Host, Port, Opts)
      of
          Cx when is_pid(Cx) -> {error, connected}
      catch
          error:{badmatch, {error,_}} -> ok
      end.
  
  