From e241fb5034372b1aa5a204d5a59141c384a252ac Mon Sep 17 00:00:00 2001
From: hardy <remi.hardy@openairinterface.org>
Date: Fri, 23 Jul 2021 16:31:43 +0200
Subject: [PATCH] fix ssh remote access to UE module

---
 ci-scripts/cls_module_ue.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ci-scripts/cls_module_ue.py b/ci-scripts/cls_module_ue.py
index 90908e0a90..1c0c05aeae 100644
--- a/ci-scripts/cls_module_ue.py
+++ b/ci-scripts/cls_module_ue.py
@@ -62,7 +62,7 @@ class Module_UE:
 	#this method checks if the specified Process is running on the server hosting the module
 	#if not it will be started
 	def CheckCMProcess(self):
-		HOST=self.HostIPAddress
+		HOST=self.HostUsername+'@'+self.HostIPAddress
 		COMMAND="ps aux | grep " + self.Process['Name'] + " | grep -v grep "
 		logging.debug(COMMAND)
 		ssh = subprocess.Popen(["ssh", "%s" % HOST, COMMAND],shell=False,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
@@ -80,7 +80,7 @@ class Module_UE:
 			mySSH.close()
 			#checking the process
 			time.sleep(5)
-			HOST=self.HostIPAddress
+			HOST=self.HostUsername+'@'+self.HostIPAddress
 			COMMAND="ps aux | grep " + self.Process['Name'] + " | grep -v grep "
 			logging.debug(COMMAND)
 			ssh = subprocess.Popen(["ssh", "%s" % HOST, COMMAND],shell=False,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
@@ -104,7 +104,7 @@ class Module_UE:
 
 	#this method retrieves the Module IP address (not the Host IP address) 
 	def GetModuleIPAddress(self):
-		HOST=self.HostIPAddress
+		HOST=self.HostUsername+'@'+self.HostIPAddress
 		response= []
 		tentative = 3 
 		while (len(response)==0) and (tentative>0):
-- 
2.26.2