This commit is contained in:
Mn
2023-11-10 16:10:51 +08:00
parent 3b20a9df76
commit f12a0ff25c
10 changed files with 3393 additions and 66 deletions

View File

@@ -2,6 +2,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection.Metadata.Ecma335;
using System.Reflection.PortableExecutable;
using System.Text;
using System.Threading.Tasks;
@@ -30,14 +31,22 @@ namespace NetPanel.Bl
public StreamReader RunCommand(string command)
{
var sshCommand = client.CreateCommand(command);
var asyncExecute = sshCommand.BeginExecute();
return new StreamReader(sshCommand.OutputStream);
//string outStr;
//while ((outStr = reader.ReadLine()) != null)
//{
//}
//}
}
public string ServerVersion()
{
return client.ConnectionInfo.ServerVersion;
}