--- a/src/xmppconsole.c
+++ b/src/xmppconsole.c
@@ -382,7 +382,7 @@
 	static struct option long_opts[] = {
 		{ "disable-tls", no_argument, 0, 0 },
 		{ "help", no_argument, 0, 0 },
-		{ "host", no_argument, 0, 'h' },
+		{ "host", required_argument, 0, 'h' },
 		{ "legacy-auth", no_argument, 0, 0 },
 		{ "legacy-ssl", no_argument, 0, 0 },
 		{ "noauth", no_argument, 0, 'n' },
