From 7c8e131a7c85c7820c75cdc4693dccff13fde923 Mon Sep 17 00:00:00 2001 From: Vivian Thiebaut Date: Fri, 21 Oct 2022 11:54:25 -0400 Subject: [PATCH 1/3] Upgrade version of ssh extension on setup.py to 1.1.3 --- src/ssh/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ssh/setup.py b/src/ssh/setup.py index a080cbec415..c58433bc6e8 100644 --- a/src/ssh/setup.py +++ b/src/ssh/setup.py @@ -7,7 +7,7 @@ from setuptools import setup, find_packages -VERSION = "1.1.2" +VERSION = "1.1.3" CLASSIFIERS = [ 'Development Status :: 4 - Beta', From f2fcdd0a60c809069ed953c599c30781327b4d88 Mon Sep 17 00:00:00 2001 From: Vivian Thiebaut Date: Tue, 25 Oct 2022 11:19:54 -0400 Subject: [PATCH 2/3] small custom bug fix --- src/ssh/azext_ssh/custom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ssh/azext_ssh/custom.py b/src/ssh/azext_ssh/custom.py index 39df248a006..678a32ac9ff 100644 --- a/src/ssh/azext_ssh/custom.py +++ b/src/ssh/azext_ssh/custom.py @@ -274,7 +274,7 @@ def _assert_args(resource_group, vm_name, ssh_ip, resource_type, cert_file, user raise azclierror.InvalidArgumentValueError("--resource-type must be either " "\"Microsoft.Compute/virtualMachines\", " "\"Microsoft.HybridCompute/machines\", " - "or \"Microsoft.ConnectedVMwareSphere/virtualMachines\".") + "or \"Microsoft.ConnectedVMwarevSphere/virtualMachines\".") if not (resource_group or vm_name or ssh_ip): raise azclierror.RequiredArgumentMissingError( From bfce68b6f1047bb9ddaae5514b6e251e721d2482 Mon Sep 17 00:00:00 2001 From: Vivian Thiebaut Date: Tue, 25 Oct 2022 16:55:31 -0400 Subject: [PATCH 3/3] Fix banner desplay on windows --- src/ssh/azext_ssh/ssh_utils.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/ssh/azext_ssh/ssh_utils.py b/src/ssh/azext_ssh/ssh_utils.py index b889ee7cbc6..f35395fb133 100644 --- a/src/ssh/azext_ssh/ssh_utils.py +++ b/src/ssh/azext_ssh/ssh_utils.py @@ -32,12 +32,10 @@ def start_ssh_connection(op_info, delete_keys, delete_cert): # Redirecting stderr: # 1. Read SSH logs to determine if authentication was successful so credentials can be deleted # 2. Read SSHProxy error messages to print friendly error messages for well known errors. - # On Linux when connecting to a local user on a host with a banner, output gets messed up if stderr redirected. + # When connecting to a local user on a host with a banner, output gets messed up if stderr redirected. # If user expects logs to be printed, do not redirect logs. In some ocasions output gets messed up. - is_local_user_on_linux = (platform.system() != 'Windows' and not delete_cert) redirect_stderr = set(['-v', '-vv', '-vvv']).isdisjoint(ssh_arg_list) and \ - (op_info.is_arc or delete_cert or op_info.delete_credentials) and \ - not is_local_user_on_linux + (delete_cert or op_info.delete_credentials) if redirect_stderr: ssh_arg_list = ['-v'] + ssh_arg_list