From 73f2e28a063adaa7822282fb440466f057bed7ac Mon Sep 17 00:00:00 2001 From: Sebastian Goscik Date: Fri, 29 Jul 2016 15:14:41 +0100 Subject: [PATCH] TelnetConnection: Added the ability to specify connection port --- devlib/utils/ssh.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/devlib/utils/ssh.py b/devlib/utils/ssh.py index 6ad6f9d..75d743f 100644 --- a/devlib/utils/ssh.py +++ b/devlib/utils/ssh.py @@ -68,8 +68,8 @@ class TelnetConnection(pxssh.pxssh): # pylint: disable=arguments-differ def login(self, server, username, password='', original_prompt=r'[#$]', login_timeout=10, - auto_prompt_reset=True, sync_multiplier=1): - cmd = 'telnet -l {} {}'.format(username, server) + auto_prompt_reset=True, sync_multiplier=1, port=23): + cmd = 'telnet -l {} {} {}'.format(username, server, port) spawn._spawn(self, cmd) # pylint: disable=protected-access i = self.expect('(?i)(?:password)', timeout=login_timeout)