Advertisement
Guest User

Untitled

a guest
Feb 17th, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using Renci.SshNet;
  7.  
  8. namespace SSH_Net
  9. {
  10. class Program
  11. {
  12. private const string Dev_Host = "hostname";
  13. private const string Dev_User = "usern";
  14. private const string Dev_Pass = "pass";
  15. private const string Dev_EP_Name = "EP Name Here";
  16.  
  17. private const string Test_Host = "";
  18. private const string Prod_Host = "";
  19.  
  20. static void Main()
  21. {
  22. ExecuteInformaticaWorkflow(Dev_Host, Dev_User, Dev_Pass, Dev_EP_Name);
  23. }
  24.  
  25. private static void ExecuteInformaticaWorkflow(string host, string username, string password, string epName)
  26. {
  27. SshClient cSSH = new SshClient(host, 22, username, password);
  28. cSSH.Connect();
  29. SshCommand launchExecPlan =
  30. cSSH.RunCommand($"cd /oracle/dac11g && ./dacCmdLine.sh StartETL \"{epName}\"");
  31. cSSH.Disconnect();
  32. cSSH.Dispose();
  33. }
  34. }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement