C# 클래스 Elastacloud.AzureManagement.ScriptMapper.Linux.LinuxSession

Specifically a linux implementation of the
상속: ISession, ICommandShell, IDisposable
파일 보기 프로젝트 열기: azurecoder/fluent-management 1 사용 예제들

공개 메소드들

메소드 설명
CopyDirectoryLocally ( string remoteDirectory, string localDirectory ) : void

Copies a directory to the local filesystem from the remote server

CopyFileLocally ( string remoteFilePath, string remoteFileName, string localDirectory ) : void

A method to copy the remote file to the local file

CreateSession ( ) : void

Creates a linux ssh session

Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

ExecuteCommand ( string command ) : string

Executes a command given a string input in the current context of the user

ExecuteShell ( List commands ) : Task

Executes a shell command in the context of a sudo su

ExecuteWithRetries ( string command, int count ) : string

Executes a command with a prescribed number of retries

LinuxSession ( string host, int port, string userName, string userPassword, bool disablePasswordLogin, Stream privateKey = null ) : System

Used to construct a linux session command

LinuxSession ( string host, int port, string userName, string userPassword, bool disablePasswordLogin, string privateKey = null ) : System

Used to construct a linux session command

UploadFile ( string remotePath, string localPath ) : void

uploads a file to the a directory of the server

메소드 상세

CopyDirectoryLocally() 공개 메소드

Copies a directory to the local filesystem from the remote server
public CopyDirectoryLocally ( string remoteDirectory, string localDirectory ) : void
remoteDirectory string The absolute path of the directory name
localDirectory string The absolute path of the directory name
리턴 void

CopyFileLocally() 공개 메소드

A method to copy the remote file to the local file
public CopyFileLocally ( string remoteFilePath, string remoteFileName, string localDirectory ) : void
remoteFilePath string The remote file on the server
remoteFileName string The name of the remote file
localDirectory string The local directoryto place the file
리턴 void

CreateSession() 공개 메소드

Creates a linux ssh session
public CreateSession ( ) : void
리턴 void

Dispose() 공개 메소드

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
리턴 void

ExecuteCommand() 공개 메소드

Executes a command given a string input in the current context of the user
public ExecuteCommand ( string command ) : string
command string
리턴 string

ExecuteShell() 공개 메소드

Executes a shell command in the context of a sudo su
public ExecuteShell ( List commands ) : Task
commands List
리턴 Task

ExecuteWithRetries() 공개 메소드

Executes a command with a prescribed number of retries
public ExecuteWithRetries ( string command, int count ) : string
command string
count int
리턴 string

LinuxSession() 공개 메소드

Used to construct a linux session command
public LinuxSession ( string host, int port, string userName, string userPassword, bool disablePasswordLogin, Stream privateKey = null ) : System
host string
port int
userName string
userPassword string
disablePasswordLogin bool
privateKey Stream
리턴 System

LinuxSession() 공개 메소드

Used to construct a linux session command
public LinuxSession ( string host, int port, string userName, string userPassword, bool disablePasswordLogin, string privateKey = null ) : System
host string
port int
userName string
userPassword string
disablePasswordLogin bool
privateKey string
리턴 System

UploadFile() 공개 메소드

uploads a file to the a directory of the server
public UploadFile ( string remotePath, string localPath ) : void
remotePath string The absolute remote path of the file - it will be overwritten every time
localPath string the local path from which the file be uploaded
리턴 void