ssh.cs

来自「Hide-Delete icon from ToolBar32 for spec」· CS 代码 · 共 47 行

CS
47
字号
namespace LicenseManage.BaseClasses
{
    class SSH
    {
        //static 
        
        public SSH()
        {
			
        }


        public static string SendSshCmd(string command)
        {//
            // SshStream ssh = new SshStream(IniInfo.HostIp, IniInfo.UserName, IniInfo.pass);
            // ssh.Prompt = "#";
            // ssh.RemoveTerminalEmulationCharacters = true;
            // Console.WriteLine(ssh.ReadResponse());
            try
            {
                //     ssh.Write(command);
            }
            catch (System.Exception e)
            {
                //Console.WriteLine("inner Exception");
                //Console.WriteLine(e.InnerException);
                //Console.WriteLine("Source");
                //Console.WriteLine(e.Source);
                //Console.WriteLine("Exception Message");
                //Console.WriteLine(e.Message);

            }
            
            //ssh.Flush();
            //string responStr = ssh.ReadResponse().Replace(command, "").Replace("[root@localhost ~]#","").Trim();
            //ssh.Dispose();
            //ssh.Flush();
            //ssh.Close();
            //ssh.Dispose();
            //ssh.Dispose();
            
            return "123";
            
        }
        
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?