• Tutorials
  • Api Documentation
  • Download
  • Credits
Show / Hide Table of Contents
  • AutoCheck.Core
    • Output
    • Output.Log
    • Output.Style
    • Output.Type
    • Script
    • Script.ExecutionMode
    • Utils
    • Utils.OS
  • AutoCheck.Core.Connectors
    • Atom
    • Base
    • Compressed
    • Css
    • Csv
    • CsvDocument
    • Dmoj
    • GDrive
    • Html
    • Math
    • Odoo
    • Operator
    • PlainText
    • PlainText.PlainTextDocument
    • Postgres
    • Rss
    • Shell
    • TextStream
    • Xml
    • Xml.XmlNodeType
  • AutoCheck.Core.CopyDetectors
    • Base
    • Base.Mode
    • Css
    • Html
    • PlainText
    • PlainText.File
    • SourceCode
    • SqlLog
    • Xml
  • AutoCheck.Core.Events
    • LogUpdateEventArgs
    • StatusUpdateEventArgs
    • StatusUpdateEventArgs.ExecutionEvent
  • AutoCheck.Core.Exceptions
    • ArgumentInvalidException
    • ArgumentNotFoundException
    • ConfigFileMissingException
    • ConnectionInvalidException
    • ConnectorInvalidException
    • ConnectorNotFoundException
    • DocumentInvalidException
    • DownloadFailedException
    • ItemNotFoundException
    • PorpertyNotFoundException
    • QueryInvalidException
    • RegexInvalidException
    • ResultMismatchException
    • ScriptInvalidException
    • ScriptNotFoundException
    • StyleInvalidException
    • StyleNotAppliedException
    • StyleNotFoundException
    • TableInconsistencyException
    • VariableInvalidException
    • VariableNotFoundException
  • Google.DiffMatchPatch
    • Diff
    • DiffMatchPatch
    • Operation
    • Patch

Class RemoteShell

Allows in/out operations and/or data validations with a remote computer (like ssh, scp, etc.).

Inheritance
System.Object
AutoCheck.Core.Connector
LocalShell
RemoteShell
Implements
System.IDisposable
Inherited Members
AutoCheck.Core.Connector.CurrentOS
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: AutoCheck.Core.Connectors
Assembly: AutoCheck.dll
Syntax
public class RemoteShell : LocalShell, IDisposable

Constructors

| Improve this Doc View Source

RemoteShell(OS, String, String, String, Int32)

Declaration
public RemoteShell(OS remoteOS, string host, string username, string password, int port = 22)
Parameters
Type Name Description
AutoCheck.Core.OS remoteOS
System.String host
System.String username
System.String password
System.Int32 port

Properties

| Improve this Doc View Source

Host

The remote host address.

Declaration
public string Host { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Password

The remote host password used to login.

Declaration
public string Password { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Port

The remote host port, where SSH is listening to.

Declaration
public int Port { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

RemoteOS

The remote host OS.

Declaration
public OS RemoteOS { get; }
Property Value
Type Description
AutoCheck.Core.OS
| Improve this Doc View Source

Shell

The SSH client used to send remote commands.

Declaration
public SshClient Shell { get; }
Property Value
Type Description
Renci.SshNet.SshClient
| Improve this Doc View Source

Username

The remote host username used to login.

Declaration
public string Username { get; }
Property Value
Type Description
System.String

Methods

| Improve this Doc View Source

CountFiles(String, Boolean)

Returns how many files has been found within the given path.

Declaration
public override int CountFiles(string path, bool recursive = true)
Parameters
Type Name Description
System.String path

Path where the files will be searched into.

System.Boolean recursive

Recursive deep search.

Returns
Type Description
System.Int32

The amount of files.

Overrides
LocalShell.CountFiles(String, Boolean)
| Improve this Doc View Source

CountFolders(String, Boolean)

Returns how many folders has been found within the given path.

Declaration
public override int CountFolders(string path, bool recursive = true)
Parameters
Type Name Description
System.String path

Path where the folders will be searched into.

System.Boolean recursive

Recursive deep search.

Returns
Type Description
System.Int32

The amount of folders.

Overrides
LocalShell.CountFolders(String, Boolean)
| Improve this Doc View Source

Dispose()

Disposes the object releasing its unmanaged properties.

Declaration
public override void Dispose()
Overrides
LocalShell.Dispose()
| Improve this Doc View Source

GetFile(String, String, Boolean)

Returns a file full path if exists.

Declaration
public override string GetFile(string path, string file, bool recursive = true)
Parameters
Type Name Description
System.String path

Path where the file will be searched into.

System.String file

The file to search.

System.Boolean recursive

Recursive deep search.

Returns
Type Description
System.String

Folder's full path, NULL if does not exists.

Overrides
LocalShell.GetFile(String, String, Boolean)
| Improve this Doc View Source

GetFolder(String, String, Boolean)

Returns a folder full path if exists.

Declaration
public override string GetFolder(string path, string folder, bool recursive = true)
Parameters
Type Name Description
System.String path

Path where the folder will be searched into.

System.String folder

The folder to search.

System.Boolean recursive

Recursive deep search.

Returns
Type Description
System.String

Folder's full path, NULL if does not exists.

Overrides
LocalShell.GetFolder(String, String, Boolean)
| Improve this Doc View Source

RunCommand(String, String)

Runs a remote shell command.

Declaration
public override (int code, string response) RunCommand(string command, string path = "")
Parameters
Type Name Description
System.String command

The command to run.

System.String path
Returns
Type Description
System.ValueTuple<System.Int32, System.String>

The return code and the complete response.

Overrides
LocalShell.RunCommand(String, String)
| Improve this Doc View Source

TestConnection()

Test the connection to the remote host, so an exception will be thrown if any problem occurs.

Declaration
public void TestConnection()

Implements

System.IDisposable
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX