mirror of
https://git.yoctoproject.org/poky
synced 2026-09-19 00:49:33 +02:00
lib/oeqa: sshcontrol: Allow alternate port for SSHControl
Add an optional parameter to SSHControl so the user can specify and alternate port to the default (22). (From OE-Core rev: 091d395e43836575587112ee1696a18c401505bb) Signed-off-by: Sipke Vriend <sipke.vriend@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
51cccb7fb9
commit
b3bb841fe6
@@ -13,7 +13,7 @@ import select
|
|||||||
|
|
||||||
class SSHControl(object):
|
class SSHControl(object):
|
||||||
|
|
||||||
def __init__(self, ip=None, timeout=300, logfile=None):
|
def __init__(self, ip=None, timeout=300, logfile=None, port=None):
|
||||||
self.ip = ip
|
self.ip = ip
|
||||||
self.timeout = timeout
|
self.timeout = timeout
|
||||||
self._starttime = None
|
self._starttime = None
|
||||||
@@ -26,6 +26,8 @@ class SSHControl(object):
|
|||||||
'-o', 'LogLevel=ERROR'
|
'-o', 'LogLevel=ERROR'
|
||||||
]
|
]
|
||||||
self.ssh = ['ssh', '-l', 'root'] + self.ssh_options
|
self.ssh = ['ssh', '-l', 'root'] + self.ssh_options
|
||||||
|
if port:
|
||||||
|
self.ssh = self.ssh + ['-p', str(port)]
|
||||||
|
|
||||||
def log(self, msg):
|
def log(self, msg):
|
||||||
if self.logfile:
|
if self.logfile:
|
||||||
|
|||||||
Reference in New Issue
Block a user