diff --git a/ffdc/plugins/ssh_execution.py b/ffdc/plugins/ssh_execution.py
new file mode 100644
index 0000000..d544d58
--- /dev/null
+++ b/ffdc/plugins/ssh_execution.py
@@ -0,0 +1,57 @@
+#!/usr/bin/env python
+
+
+import os
+import sys
+
+# ---------Set sys.path for pluqin execution---------------------------------------
+# Absolute path to this plugin
+abs_path = os.path.abspath(os.path.dirname(sys.argv[0]))
+# full_path to plugins parent directory
+full_path = abs_path.split('plugins')[0]
+sys.path.append(full_path)
+# Walk path and append to sys.path
+for root, dirs, files in os.walk(full_path):
+    for found_dir in dirs:
+        sys.path.append(os.path.join(root, found_dir))
+
+# ssh_utility is in ../lib
+from ssh_utility import SSHRemoteclient
+
+
+def ssh_execute_cmd(hostname,
+                    username,
+                    password,
+                    command,
+                    timeout=60):
+    r"""
+        Description of argument(s):
+
+        hostname        Name/IP of the remote (targeting) host
+        username        User on the remote host with access to FFCD files
+        password        Password for user on remote host
+        command         Command to run on remote host
+        timeout         Time, in second, to wait for command completion
+    """
+    ssh_remoteclient = SSHRemoteclient(hostname,
+                                       username,
+                                       password)
+
+    cmd_exit_code = 0
+    err = ''
+    response = ''
+    if ssh_remoteclient.ssh_remoteclient_login():
+
+        """
+        cmd_exit_code: command exit status from remote host
+        err: stderr from remote host
+        response: stdout from remote host
+        """
+        cmd_exit_code, err, response = \
+            ssh_remoteclient.execute_command(command, timeout)
+
+    # Close ssh session
+    if ssh_remoteclient:
+        ssh_remoteclient.ssh_remoteclient_disconnect()
+
+    return response
diff --git a/ffdc/plugins/telnet_execution.py b/ffdc/plugins/telnet_execution.py
new file mode 100644
index 0000000..7ae23c1
--- /dev/null
+++ b/ffdc/plugins/telnet_execution.py
@@ -0,0 +1,48 @@
+#!/usr/bin/env python
+
+
+import os
+import sys
+
+# ---------Set sys.path for pluqin execution---------------------------------------
+# Absolute path to this plugin
+abs_path = os.path.abspath(os.path.dirname(sys.argv[0]))
+# full_path to plugins parent directory
+full_path = abs_path.split('plugins')[0]
+sys.path.append(full_path)
+# Walk path and append to sys.path
+for root, dirs, files in os.walk(full_path):
+    for found_dir in dirs:
+        sys.path.append(os.path.join(root, found_dir))
+
+from telnet_utility import TelnetRemoteclient
+
+
+def telnet_execute_cmd(hostname,
+                       username,
+                       password,
+                       command,
+                       timeout=60):
+    r"""
+        Description of argument(s):
+
+        hostname        Name/IP of the remote (targeting) host
+        username        User on the remote host with access to FFCD files
+        password        Password for user on remote host
+        command         Command to run on remote host
+        timeout         Time, in second, to wait for command completion
+    """
+    telnet_remoteclient = TelnetRemoteclient(hostname,
+                                             username,
+                                             password)
+    result = ''
+    if telnet_remoteclient.tn_remoteclient_login():
+        # result: stdout from remote host
+        result = \
+            telnet_remoteclient.execute_command(command, timeout)
+
+    # Close telnet session
+    if telnet_remoteclient:
+        telnet_remoteclient.tn_remoteclient_disconnect()
+
+    return result
