Index: uspace/srv/hid/remcons/telnet.h
===================================================================
--- uspace/srv/hid/remcons/telnet.h	(revision 99c2e9f3c319eeb78d3eeebdeef3d90d3d9f6a7b)
+++ uspace/srv/hid/remcons/telnet.h	(revision 2a18030725ce4100bb147819d7480fd9d909991b)
@@ -45,6 +45,12 @@
 
 #define TELNET_IAC 255
+
 #define TELNET_WILL 251
 #define TELNET_WONT 252
+#define TELNET_DO 253
+#define TELNET_DONT 254
+
+#define TELNET_IS_OPTION_CODE(code) (((code) >= 251) && ((code) <= 254))
+
 #define TELNET_ECHO 1
 #define TELNET_SUPPRESS_GO_AHEAD 3
Index: uspace/srv/hid/remcons/user.c
===================================================================
--- uspace/srv/hid/remcons/user.c	(revision 99c2e9f3c319eeb78d3eeebdeef3d90d3d9f6a7b)
+++ uspace/srv/hid/remcons/user.c	(revision 2a18030725ce4100bb147819d7480fd9d909991b)
@@ -55,4 +55,5 @@
 #include <assert.h>
 #include "user.h"
+#include "telnet.h"
 
 static FIBRIL_MUTEX_INITIALIZE(users_guard);
@@ -228,4 +229,16 @@
 }
 
+static void process_telnet_command(telnet_user_t *user,
+    telnet_cmd_t option_code, telnet_cmd_t cmd)
+{
+	if (option_code != 0) {
+		telnet_user_log(user, "Ignoring telnet command %u %u %u.",
+		    TELNET_IAC, option_code, cmd);
+	} else {
+		telnet_user_log(user, "Ignoring telnet command %u %u.",
+		    TELNET_IAC, cmd);
+	}
+}
+
 int telnet_user_get_next_keyboard_event(telnet_user_t *user, kbd_event_t *event)
 {
@@ -233,11 +246,32 @@
 	if (list_empty(&user->in_events.list)) {
 		char next_byte = 0;
+		bool inside_telnet_command = false;
+
+		telnet_cmd_t telnet_option_code = 0;
+
 		/* Skip zeros, bail-out on error. */
 		while (next_byte == 0) {
 			int rc = telnet_user_recv_next_byte_no_lock(user, &next_byte);
-			DEBUG("Got %d.\n", next_byte);
 			if (rc != EOK) {
 				fibril_mutex_unlock(&user->guard);
 				return rc;
+			}
+			uint8_t byte = (uint8_t) next_byte;
+
+			/* Skip telnet commands. */
+			if (inside_telnet_command) {
+				inside_telnet_command = false;
+				next_byte = 0;
+				if (TELNET_IS_OPTION_CODE(byte)) {
+					telnet_option_code = byte;
+					inside_telnet_command = true;
+				} else {
+					process_telnet_command(user,
+					    telnet_option_code, byte);
+				}
+			}
+			if (byte == TELNET_IAC) {
+				inside_telnet_command = true;
+				next_byte = 0;
 			}
 		}
