anchor.diff:      ConnectionRef = ssh_test_lib:connect(?SSH_DEFAULT_PORT, [{silently_accept_hosts, true},
   							     {user_interaction, false}]),
       {ok, ChannelId0} = ssh_connection:session_channel(ConnectionRef, infinity),
  +    Data = <<"I like spaghetti squash">>,
   
       %% Shell command "false" will exit immediately
       success = ssh_connection:exec(ConnectionRef, ChannelId0,
   				  "false", infinity),
  -
  -    timer:sleep(2000), %% Allow incoming eof/close/exit_status ssh messages to be processed
  -
  -    Data = <<"I like spaghetti squash">>,
  +    receive
  +	{ssh_cm, ConnectionRef, {eof, ChannelId0}} ->
  +	    ok
  +    end,
  +    receive
  +	{ssh_cm, ConnectionRef, {exit_status, ChannelId0, _ExitStatus}} ->
  +	    ok
  +    end,
  +    receive
  +	{ssh_cm, ConnectionRef,{closed, ChannelId0}} ->
  +	    ok
  +    end,
       case ssh_connection:send(ConnectionRef, ChannelId0, Data, 2000) of
   	{error, closed} -> ok;
   	ok ->
  -	    ct:fail({expected,{error,closed}});
  +	    ct:fail({expected,{error,closed}, {got, ok}});
   	{error, timeout} ->
  -	    ct:fail({expected,{error,closed}});
  +	    ct:fail({expected,{error,closed}, {got, {error, timeout}}});
   	Else ->
   	    ct:fail(Else)
  -    end,
  -
  -    %% receive close messages
  -    receive
  -	{ssh_cm, ConnectionRef, {eof, ChannelId0}} ->
  -	    ok
  -    end,
  -    receive
  -	{ssh_cm, ConnectionRef, {exit_status, ChannelId0, _}} ->
  -	    ok
  -    end,
  -    receive
  -	{ssh_cm, ConnectionRef,{closed, ChannelId0}} ->
  -	    ok
  -    end.
  +    end.
  +
   %%--------------------------------------------------------------------
   interrupted_send() ->
       [{doc, "Use a subsystem that echos n char and then sends eof to cause a channel exit partway through a large send."}].
  
positive.code:     {ok, ChannelId0} = ssh_connection:session_channel(ConnectionRef, infinity),
      success = ssh_connection:exec(ConnectionRef, ChannelId0,
  				  "echo testing", infinity),
  
      %% receive response to input
      receive
  	{ssh_cm, ConnectionRef, {data, ChannelId0, 0, <<"testing\n">>}} ->
  
negative.code: 
  %%--------------------------------------------------------------------
  init_per_testcase(_TestCase, Config) ->
      %% To make sure we start clean as it is not certain that
      %% end_per_testcase will be run!
      ssh:stop(),
      ssh:start(),
      Config.
  
  