anchor.diff:  						      {user_interaction, true},
   						      {user_dir, UserDir}]),
   
  +    %% Allocate a number of ChannelId:s to play with. (This operation is not
  +    %% counted by the max_channel option).
       {ok, ChannelId0} = ssh_connection:session_channel(ConnectionRef, infinity),
       {ok, ChannelId1} = ssh_connection:session_channel(ConnectionRef, infinity),
       {ok, ChannelId2} = ssh_connection:session_channel(ConnectionRef, infinity),
       {ok, ChannelId3} = ssh_connection:session_channel(ConnectionRef, infinity),
       {ok, ChannelId4} = ssh_connection:session_channel(ConnectionRef, infinity),
       {ok, ChannelId5} = ssh_connection:session_channel(ConnectionRef, infinity),
  -    {ok, _ChannelId6} = ssh_connection:session_channel(ConnectionRef, infinity),
  -
  -    %%%---- shell
  +    {ok, ChannelId6} = ssh_connection:session_channel(ConnectionRef, infinity),
  +    {ok, _ChannelId7} = ssh_connection:session_channel(ConnectionRef, infinity),
  +
  +    %% Now start to open the channels (this is counted my max_channels) to check that
  +    %% it gives a failure at right place
  +
  +    %%%---- Channel 1(3): shell
       ok = ssh_connection:shell(ConnectionRef,ChannelId0),
       receive
   	{ssh_cm,ConnectionRef, {data, ChannelId0, 0, <<"Eshell",_/binary>>}} ->
  
positive.code: 	    ct:fail("exit Timeout",[])
      end,
  
      %%%---- exec #3
      success = ssh_connection:exec(ConnectionRef, ChannelId5, "testing3.\n", infinity),
      receive
  	{ssh_cm, ConnectionRef, {data, ChannelId5, 0, <<"testing3",_/binary>>}} ->
  	    ok
      after 5000 ->
  	    ct:fail("Exec #3 Timeout")
      end,
  
      ssh:close(ConnectionRef),
      ssh:stop_daemon(Pid).
  
negative.code: 	    ct:fail("Exec #1 Timeout")
      end,
  
      %%%---- Channel 3(3): subsystem "echo_n" (Note that ChannelId2 should be closed now)
      success = ssh_connection:subsystem(ConnectionRef, ChannelId3, "echo_n", infinity),
  
      %%%---- Channel 4(3) !: exec  This should fail
      failure = ssh_connection:exec(ConnectionRef, ChannelId4, "testing2.\n", infinity),
  
      %%%---- close the shell (Frees one channel)
      ok = ssh_connection:send(ConnectionRef, ChannelId0, "exit().\n", 5000),
      
      %%%---- wait for the subsystem to terminate
  