Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using Renci.SshNet;
- namespace SSH_Net
- {
- class Program
- {
- private const string Dev_Host = "hostname";
- private const string Dev_User = "usern";
- private const string Dev_Pass = "pass";
- private const string Dev_EP_Name = "EP Name Here";
- private const string Test_Host = "";
- private const string Prod_Host = "";
- static void Main()
- {
- ExecuteInformaticaWorkflow(Dev_Host, Dev_User, Dev_Pass, Dev_EP_Name);
- }
- private static void ExecuteInformaticaWorkflow(string host, string username, string password, string epName)
- {
- SshClient cSSH = new SshClient(host, 22, username, password);
- cSSH.Connect();
- SshCommand launchExecPlan =
- cSSH.RunCommand($"cd /oracle/dac11g && ./dacCmdLine.sh StartETL \"{epName}\"");
- cSSH.Disconnect();
- cSSH.Dispose();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement