-
Story
-
Resolution: Unresolved
-
Minor
-
rhel-9.6, rhel-10.0
-
openssh-9.9p1-11.el10
-
Low
-
1
-
rhel-security-crypto
-
ssg_security
-
26
-
1
-
False
-
False
-
-
Yes
-
Crypto25July
-
-
Pass
-
Not Needed
-
Automated
-
Bug Fix
-
-
Done
-
Done
-
Done
-
Unspecified
-
-
All
-
None
On RHEL 9.6 ssh now prints this:
$ ssh localhost -p 12345 ssh: connect to host localhost port 12345: Connection refused You can find some explanations for typical errors at this link: https://red.ht/support_rhel_ssh
First of all, I think the text could be improved to look more serious:
The link below provides guidance on resolving common SSH errors:
https://red.ht/support_rhel_ssh
Second, there is no possibility to 'opt-out' of the message - a divergence from 30 years of ssh -.
I am therefore submitting this updated patch to work around the problem:
[root@rh9x64 ~]# ssh localhost -p 12345
ssh: connect to host localhost port 12345: Connection refused
The link below provides guidance on resolving common SSH errors:
https://red.ht/support_rhel_ssh
[root@rh9x64 ~]# touch /etc/ssh/advanced_ssh_users
[root@rh9x64 ~]# ssh localhost -p 12345
ssh: connect to host localhost port 12345: Connection refused
patch:
// openssh-8.7p1-redhat-help.patch diff -rNu openssh-8.7p1.orig/ssh.c openssh-8.7p1/ssh.c --- openssh-8.7p1.orig/ssh.c 2025-05-28 06:48:37.448998092 -0400 +++ openssh-8.7p1/ssh.c 2025-05-28 07:50:19.498156177 -0400 @@ -175,6 +175,20 @@ extern u_int muxclient_command; /* Prints a help message to the user. This function never returns. */ +static void +redhat_usage(void) +{ + if(isatty(fileno(stderr))) { + if (access("/etc/ssh/advanced_ssh_users", F_OK) == 0) { + return; + } else { + fprintf(stderr, +"\nThe link below provides guidance on resolving common SSH errors:\n" +" https://red.ht/support_rhel_ssh\n" + ); + } + } +} static void usage(void) @@ -188,6 +202,7 @@ " [-Q query_option] [-R address] [-S ctl_path] [-W host:port]\n" " [-w local_tun[:remote_tun]] destination [command]\n" ); + redhat_usage(); exit(255); } @@ -1609,8 +1624,10 @@ /* 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_usage(); exit(255); + } if (addrs != NULL) freeaddrinfo(addrs);
- is duplicated by
-
RHEL-92589 ssh writing out extra text on error
-
- Closed
-
- links to
-
RHSA-2025:148796 openssh security update