Re: SUCCESS: OpenSSH_6.7p1-snap20150220

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

 



On Fri, 20 Feb 2015, Herb.Goldman@xxxxxxx wrote:

> Compiled OK, and operating nicely on CentOS 6.6, both 32/64 bit.
> Really appreciate the UpdateHostkeys feature!
> One issue I noticed, the screen output gets garbled if the user has been "asked" to "Accept" the new hostkeys.
> Looks like the screen output is missing the CR's, and only LF's get presented.
> 
> [root@be2 .ssh]# ssh be1 ls -l
> Warning: Permanently added 'be1,fec0::ffff:0:1:c0a8:415' (ECDSA) to the list of known hosts.
> total 12
> -rw-r--r-- 1 root root 1829 Jan 23 17:43 authorized_keys
> -rw-r--r-- 1 root root  575 Jan 21 17:24 sshd.pam
> drwxr-xr-x 2 root root 4096 Feb  9 14:17 tmp
> 
> [root@be2 .ssh]# ssh -o UpdateHostkeys=yes be1 ls -l
> Learned new hostkey: RSA SHA256:Alc84pvwkLVLIyRC7Z5HUpYeySwK+aMykv9cw6LCark
> Learned new hostkey: DSA SHA256:4RFtn0pMD4/AiKANWn6K3ODT66Jw8CE4SXOnAbOBXgQ
> Learned new hostkey: ED25519 SHA256:OzKAhPkHQDfk7GTvSZRKIHIv+25inWKy2n0PF8HbIhY
> Learned new hostkey: RSA SHA256:ZaHa2K0aOv6zzVTNviT08xk/ZY8xeML9uz62OiHAxOM
> Learned new hostkey: DSA SHA256:yYtO6dUL0cATSEBAyOyQApxehlhliWY5t5Z0p1CplpY
> Learned new hostkey: ECDSA SHA256:70rXiF+VgchFSvKmBQ/sXw+iANmwVTnmzQzlytaBpx4
> Learned new hostkey: ED25519 SHA256:n/qAw/sTr+4KnQ1okNg/s3tgV9wRjXULbP/a9Jy++oA
> Accept updated hostkeys? (yes/no): yes
> total 12
>         -rw-r--r-- 1 root root 1829 Jan 23 17:43 authorized_keys
>                                                                 -rw-r--r-- 1 root root  575 Jan 21 17:24 sshd.pam
>   drwxr-xr-x 2 root root 4096 Feb  9 14:17 tmp
>                                               [root@be2 .ssh]#

I think this patch should solve this problem - can you confirm?

diff --git a/clientloop.c b/clientloop.c
index 644a1f2..0a58db7 100644
--- a/clientloop.c
+++ b/clientloop.c
@@ -2176,7 +2176,8 @@ update_known_hosts(struct hostkeys_update_ctx *ctx)
 		free(fp);
 	}
 	if (options.update_hostkeys == SSH_UPDATE_HOSTKEYS_ASK) {
-		leave_raw_mode(options.request_tty == REQUEST_TTY_FORCE);
+		if (have_pty)
+			leave_raw_mode(options.request_tty == REQUEST_TTY_FORCE);
 		response = NULL;
 		for (i = 0; !quit_pending && i < 3; i++) {
 			free(response);
@@ -2196,7 +2197,8 @@ update_known_hosts(struct hostkeys_update_ctx *ctx)
 		if (quit_pending || i >= 3 || response == NULL)
 			options.update_hostkeys = 0;
 		free(response);
-		enter_raw_mode(options.request_tty == REQUEST_TTY_FORCE);
+		if (have_pty)
+			enter_raw_mode(options.request_tty == REQUEST_TTY_FORCE);
 	}
 
 	/*

_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@xxxxxxxxxxx
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev




[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux