Exemple #1
0
        private static void Main(string[] args)
        {
            Console.WindowWidth = 100;
            Console.WindowHeight = 50;

            SSHControl ssh = new SSHControl();
            //ssh.Start();
            SSHJob job = new SSHJob();
            job.Commands = new List<string>();
            Console.WriteLine("Enter IP:");
            job.IP = Console.ReadLine();

            Console.WriteLine("Enter Username:"******"Enter PW:");
            job.PW = Console.ReadLine();

            while (true)
            {
                Console.WriteLine("Enter command:");
                string cmd = Console.ReadLine();
                job.Commands.Add(cmd);
                ssh.ExecSSHJob(job);
                job.Commands.Remove(cmd);
            }

            //ssh.Stop();
        }
Exemple #2
0
 public Service1()
 {
     InitializeComponent();
     _ssh = new SSHControl();
 }