123456
This commit is contained in:
@@ -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;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user