diff --git a/framework/core/commandModules/serialClass.py b/framework/core/commandModules/serialClass.py index 30fbda3..7c617fd 100644 --- a/framework/core/commandModules/serialClass.py +++ b/framework/core/commandModules/serialClass.py @@ -200,5 +200,5 @@ def flush(self) -> bool: True if can successfully clear the serial console. """ self.log.info("Clearing Serial console log") - self.serialCon.flushInput() + self.serialCon.reset_input_buffer() return True diff --git a/framework/core/commandModules/sshConsole.py b/framework/core/commandModules/sshConsole.py index e3b1ed5..3f7aa31 100644 --- a/framework/core/commandModules/sshConsole.py +++ b/framework/core/commandModules/sshConsole.py @@ -67,7 +67,29 @@ def open(self) -> bool: """Open the SSH session. """ try: - self.console.connect(self.address, username = self.username, password = self.password, key_filename=self.key, port=self.port) + # Prepare password (convert None to empty string for password-less auth) + password = self.password or '' + + # Only use key-based auth if a key file is explicitly provided + if self.key: + self.console.connect( + self.address, + username=self.username, + password=password, + key_filename=self.key, + port=self.port + ) + else: + # No key file - use password-only auth (disable automatic key discovery) + self.console.connect( + self.address, + username=self.username, + password=password, + port=self.port, + look_for_keys=False, # Don't try to use SSH keys from ~/.ssh + allow_agent=False # Don't try to use SSH agent + ) + self.is_open = True return True except Exception as e: