sshclient: Stop disabling password auth
Change-Id: I938b56350dbbf7cce0d78b7f8abd247b683e9e7f
diff --git a/mdt/sshclient.py b/mdt/sshclient.py
index 8942081..9355e96 100644
--- a/mdt/sshclient.py
+++ b/mdt/sshclient.py
@@ -42,10 +42,6 @@
pass
-class PasswordAuthDisableError(Exception):
- pass
-
-
class SshClient:
def __init__(self, device, address):
self.config = config.Config()
@@ -135,13 +131,6 @@
allow_agent=False,
look_for_keys=False,
compress=True)
-
- if self.config.shouldDisablePasswordAuth() == "true":
- print("Key push successful: disabling password authentication")
- self.client.exec_command(
- "sudo sed -e's/^#?PasswordAuthentication.*/PasswordAuthentication no/g' -i "
- "/etc/ssh/sshd_config")
- self.client.exec_command('sudo systemctl restart ssh')
except AuthenticationException as e:
raise KeyPushError(e)
except (SSHException, socket.error) as e: