cleanup_exit(1);
}
+void modalfatalbox(char *fmt, ...)
+{
+ char str[0x100]; /* Make the size big enough */
+ va_list ap;
+ va_start(ap, fmt);
+ strcpy(str, "Fatal:");
+ vsprintf(str + strlen(str), fmt, ap);
+ va_end(ap);
+ strcat(str, "\n");
+ fputs(str, stderr);
+
+ cleanup_exit(1);
+}
void connection_fatal(char *fmt, ...)
{
char str[0x100]; /* Make the size big enough */
printf(" -bc output batchfile commands\n");
printf(" -be don't stop batchfile processing if errors\n");
printf(" -v show verbose messages\n");
+ printf(" -load sessname Load settings from saved session\n");
+ printf(" -l user connect with specified username\n");
printf(" -P port connect to specified port\n");
printf(" -pw passw login with specified password\n");
+ printf(" -1 -2 force use of particular SSH protocol version\n");
+ printf(" -C enable compression\n");
+ printf(" -i key private key file for authentication\n");
+ printf(" -batch disable all interactive prompts\n");
cleanup_exit(1);
}
do_defaults(NULL, &cfg);
strncpy(cfg.host, host, sizeof(cfg.host) - 1);
cfg.host[sizeof(cfg.host) - 1] = '\0';
- cfg.port = 22;
+ }
+
+ /*
+ * Force use of SSH. (If they got the protocol wrong we assume the
+ * port is useless too.)
+ */
+ if (cfg.protocol != PROT_SSH) {
+ cfg.protocol = PROT_SSH;
+ cfg.port = 22;
}
/*
}
}
- if (cfg.protocol != PROT_SSH)
- cfg.port = 22;
-
if (portnumber)
cfg.port = portnumber;
} else if (strcmp(argv[i], "-h") == 0 ||
strcmp(argv[i], "-?") == 0) {
usage();
- } else if (strcmp(argv[i], "-l") == 0 && i + 1 < argc) {
- user = argv[++i];
} else if (strcmp(argv[i], "-batch") == 0) {
console_batch_mode = 1;
} else if (strcmp(argv[i], "-b") == 0 && i + 1 < argc) {