diff --git a/Makefile.in b/Makefile.in
index 68ef5d8216197900fbdfbe740e7ab0a7c40166af..4ea2f285a7b1d89cf220ec7a15a161fb5d14d52b 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -33,7 +33,7 @@ CLIOBJS=cli-algo.o cli-main.o cli-auth.o cli-authpasswd.o cli-kex.o \
 
 CLISVROBJS=common-session.o packet.o common-algo.o common-kex.o \
 			common-channel.o common-chansession.o termcodes.o loginrec.o \
-			tcp-accept.o tcp-connect.o listener.o process-packet.o \
+			tcp-accept.o listener.o process-packet.o \
 			common-runopts.o
 
 KEYOBJS=dropbearkey.o gendss.o genrsa.o
diff --git a/cli-session.c b/cli-session.c
index 318bc64e2afbd9de0ee594606956a6f27ad4a9e6..20ce89ace50a2197dbdf0644cedf11c9373c4875 100644
--- a/cli-session.c
+++ b/cli-session.c
@@ -179,8 +179,10 @@ static void cli_sessionloop() {
 
 		case USERAUTH_SUCCESS_RCVD:
 #ifdef ENABLE_CLI_LOCALTCPFWD
-			TRACE(("recvd USERAUTH_SUCCESS_RCVD"));
 			setup_localtcp();
+#endif
+#ifdef ENABLE_CLI_REMOTETCPFWD
+			setup_remotetcp();
 #endif
 			cli_send_chansess_request();
 			TRACE(("leave cli_sessionloop: cli_send_chansess_request"));
diff --git a/options.h b/options.h
index c841332fb8da1a9d56949fedaaad133db079bcf8..cb9dc9a8d257cb2681e31fa1e0804979cc5c9f79 100644
--- a/options.h
+++ b/options.h
@@ -306,6 +306,10 @@
 #define ENABLE_CLI_ANYTCPFWD 
 #endif
 
+#if defined(ENABLE_CLI_LOCALTCPFWD) || defined(ENABLE_SVR_REMOTETCPFWD)
+#define DROPBEAR_TCP_ACCEPT
+#endif
+
 #if defined(ENABLE_REMOTETCPFWD) || defined(ENABLE_LOCALTCPFWD) || \
 	defined(ENABLE_AGENTFWD) || defined(ENABLE_X11FWD)
 #define USING_LISTENERS
diff --git a/tcp-accept.c b/tcp-accept.c
index 6b82914b982ed0b700be09b09ff24fdced324e8b..63d97757d72cb0b0338f495c2d9efabb1a803bc8 100644
--- a/tcp-accept.c
+++ b/tcp-accept.c
@@ -8,8 +8,7 @@
 #include "listener.h"
 #include "runopts.h"
 
-#ifndef DISABLE_TCP_ACCEPT
-
+#ifdef DROPBEAR_TCP_ACCEPT
 
 static void cleanup_tcp(struct Listener *listener) {
 
@@ -94,4 +93,4 @@ int listen_tcpfwd(struct TCPListener* tcpinfo) {
 	return DROPBEAR_SUCCESS;
 }
 
-#endif /* DISABLE_REMOTETCPFWD */
+#endif /* DROPBEAR_TCP_ACCEPT */