summaryrefslogtreecommitdiff
path: root/sshconnect.c
diff options
context:
space:
mode:
Diffstat (limited to 'sshconnect.c')
-rw-r--r--sshconnect.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/sshconnect.c b/sshconnect.c
index 483eb85ac..ad960fdbf 100644
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -151,7 +151,7 @@ ssh_proxy_connect(const char *host, u_short port, const char *proxy_command)
151 /* Execute the proxy command. Note that we gave up any 151 /* Execute the proxy command. Note that we gave up any
152 extra privileges above. */ 152 extra privileges above. */
153 signal(SIGPIPE, SIG_DFL); 153 signal(SIGPIPE, SIG_DFL);
154 execv(argv[0], argv); 154 execvp(argv[0], argv);
155 perror(argv[0]); 155 perror(argv[0]);
156 exit(1); 156 exit(1);
157 } 157 }
@@ -442,10 +442,10 @@ send_client_banner(int connection_out, int minor1)
442 /* Send our own protocol version identification. */ 442 /* Send our own protocol version identification. */
443 if (compat20) { 443 if (compat20) {
444 xasprintf(&client_version_string, "SSH-%d.%d-%.100s\r\n", 444 xasprintf(&client_version_string, "SSH-%d.%d-%.100s\r\n",
445 PROTOCOL_MAJOR_2, PROTOCOL_MINOR_2, SSH_VERSION); 445 PROTOCOL_MAJOR_2, PROTOCOL_MINOR_2, SSH_RELEASE);
446 } else { 446 } else {
447 xasprintf(&client_version_string, "SSH-%d.%d-%.100s\n", 447 xasprintf(&client_version_string, "SSH-%d.%d-%.100s\n",
448 PROTOCOL_MAJOR_1, minor1, SSH_VERSION); 448 PROTOCOL_MAJOR_1, minor1, SSH_RELEASE);
449 } 449 }
450 if (roaming_atomicio(vwrite, connection_out, client_version_string, 450 if (roaming_atomicio(vwrite, connection_out, client_version_string,
451 strlen(client_version_string)) != strlen(client_version_string)) 451 strlen(client_version_string)) != strlen(client_version_string))
@@ -981,9 +981,12 @@ check_host_key(char *hostname, struct sockaddr *hostaddr, u_short port,
981 error("%s. This could either mean that", key_msg); 981 error("%s. This could either mean that", key_msg);
982 error("DNS SPOOFING is happening or the IP address for the host"); 982 error("DNS SPOOFING is happening or the IP address for the host");
983 error("and its host key have changed at the same time."); 983 error("and its host key have changed at the same time.");
984 if (ip_status != HOST_NEW) 984 if (ip_status != HOST_NEW) {
985 error("Offending key for IP in %s:%lu", 985 error("Offending key for IP in %s:%lu",
986 ip_found->file, ip_found->line); 986 ip_found->file, ip_found->line);
987 error(" remove with: ssh-keygen -f \"%s\" -R %s",
988 ip_found->file, ip);
989 }
987 } 990 }
988 /* The host key has changed. */ 991 /* The host key has changed. */
989 warn_changed_key(host_key); 992 warn_changed_key(host_key);
@@ -991,6 +994,8 @@ check_host_key(char *hostname, struct sockaddr *hostaddr, u_short port,
991 user_hostfiles[0]); 994 user_hostfiles[0]);
992 error("Offending %s key in %s:%lu", key_type(host_found->key), 995 error("Offending %s key in %s:%lu", key_type(host_found->key),
993 host_found->file, host_found->line); 996 host_found->file, host_found->line);
997 error(" remove with: ssh-keygen -f \"%s\" -R %s",
998 host_found->file, host);
994 999
995 /* 1000 /*
996 * If strict host key checking is in use, the user will have 1001 * If strict host key checking is in use, the user will have
@@ -1298,7 +1303,7 @@ ssh_local_cmd(const char *args)
1298 if (pid == 0) { 1303 if (pid == 0) {
1299 signal(SIGPIPE, SIG_DFL); 1304 signal(SIGPIPE, SIG_DFL);
1300 debug3("Executing %s -c \"%s\"", shell, args); 1305 debug3("Executing %s -c \"%s\"", shell, args);
1301 execl(shell, shell, "-c", args, (char *)NULL); 1306 execlp(shell, shell, "-c", args, (char *)NULL);
1302 error("Couldn't execute %s -c \"%s\": %s", 1307 error("Couldn't execute %s -c \"%s\": %s",
1303 shell, args, strerror(errno)); 1308 shell, args, strerror(errno));
1304 _exit(1); 1309 _exit(1);