openssh/SOURCES/openssh-8.7p1-redhat-help.patch

34 lines
1005 B
Diff

diff --color -ruNp a/ssh.c b/ssh.c
--- a/ssh.c 2025-07-21 16:24:30.348843762 +0200
+++ b/ssh.c 2025-07-21 16:27:20.477953307 +0200
@@ -174,6 +174,17 @@ static int forward_confirms_pending = -1
extern int muxserver_sock;
extern u_int muxclient_command;
+static void
+redhat_help_message(void)
+{
+ if (log_level_get() >= SYSLOG_LEVEL_DEBUG1 &&
+ isatty(fileno(stderr))) {
+ fprintf(stderr,
+"\nThe link below provides guidance on resolving common SSH errors:\n"
+" https://red.ht/support_rhel_ssh\n");
+ }
+}
+
/* Prints a help message to the user. This function never returns. */
static void
@@ -1609,8 +1620,10 @@ main(int ac, char **av)
/* Open a connection to the remote host. */
if (ssh_connect(ssh, host, host_arg, addrs, &hostaddr, options.port,
options.connection_attempts,
- &timeout_ms, options.tcp_keep_alive) != 0)
+ &timeout_ms, options.tcp_keep_alive) != 0) {
+ redhat_help_message();
exit(255);
+ }
if (addrs != NULL)
freeaddrinfo(addrs);