anchor.diff:      ssh:close(ConnectionRef),
       ssh:stop_daemon(Pid).
   
  +%%-------------------------------------------------------------------
  +start_shell_pty(Config) when is_list(Config) ->
  +    PrivDir = proplists:get_value(priv_dir, Config),
  +    UserDir = filename:join(PrivDir, nopubkey), % to make sure we don't use public-key-auth
  +    file:make_dir(UserDir),
  +    SysDir = proplists:get_value(data_dir, Config),
  +    {Pid, Host, Port} = ssh_test_lib:daemon([{system_dir, SysDir},
  +					     {user_dir, UserDir},
  +					     {password, "morot"},
  +					     {shell, fun(U, H) -> start_our_shell(U, H) end} ]),
  +
  +    ConnectionRef = ssh_test_lib:connect(Host, Port, [{silently_accept_hosts, true},
  +						      {user, "foo"},
  +						      {password, "morot"},
  +						      {user_interaction, true},
  +						      {user_dir, UserDir}]),
  +    test_shell_is_enabled(ConnectionRef, <<"Enter command\r\n">>, [{pty_opts,[{onlcr,1}]}]), % alloc pty 
  +    test_exec_is_disabled(ConnectionRef),
  +    ssh:close(ConnectionRef),
  +    ssh:stop_daemon(Pid).
  +
   
   %%--------------------------------------------------------------------
   start_shell_exec(Config) when is_list(Config) ->
  
positive.code:      exec_disabled,
       exec_shell_disabled,
       start_shell,
       start_shell_exec,
       start_shell_exec_fun,
       start_shell_exec_fun2,
  
negative.code:     test_shell_is_enabled(ConnectionRef, <<"Eshell V">>).
  
  test_shell_is_enabled(ConnectionRef, Expect) ->
      test_shell_is_enabled(ConnectionRef, Expect, []).
  
  test_shell_is_enabled(ConnectionRef, Expect, PtyOpts) ->
      {ok, ChannelId} = ssh_connection:session_channel(ConnectionRef, infinity),
      ok = ssh_connection:shell(ConnectionRef,ChannelId),
      case PtyOpts of
          [] ->
              no_alloc;
          _ ->
              success = ssh_connection:ptty_alloc(ConnectionRef, ChannelId, PtyOpts)
      end,
      ExpSz = size(Expect),
      receive
  	{ssh_cm,ConnectionRef, {data, ChannelId, 0, <<Expect:ExpSz/binary, _/binary>>}} ->
  