RemoteSshUtil

public class RemoteSshUtil
extends Object

java.lang.Object
   ↳ com.android.tradefed.util.RemoteSshUtil


リモート インスタンスで ssh コマンドを実行するユーティリティ。

概要

パブリック コンストラクタ

RemoteSshUtil()

パブリック メソッド

static CommandResult remoteSshCommandExec(String host, String user, File sshPrivateKey, IRunUtil runUtil, long timeoutMs, String... command)

ssh を使用してリモート インスタンスでコマンドを実行します。

static CommandResult remoteSshCommandExec(String host, String user, File sshPrivateKey, IRunUtil runUtil, long timeoutMs, OutputStream stdout, OutputStream stderr, String... command)

ssh を使用してリモート インスタンスでコマンドを実行します。

パブリック コンストラクタ

RemoteSshUtil

public RemoteSshUtil ()

パブリック メソッド

remoteSshCommandExec

public static CommandResult remoteSshCommandExec (String host, 
                String user, 
                File sshPrivateKey, 
                IRunUtil runUtil, 
                long timeoutMs, 
                String... command)

ssh を使用してリモート インスタンスでコマンドを実行します。

パラメータ
host String

user String

sshPrivateKey File

runUtil IRunUtil: コマンドを実行する IRunUtil。

timeoutMs long: フェッチが完了するまでの時間(ミリ秒単位)

command String: 実行されるコマンド。

戻り値
CommandResult ステータスとログを含む CommandResult。

remoteSshCommandExec

public static CommandResult remoteSshCommandExec (String host, 
                String user, 
                File sshPrivateKey, 
                IRunUtil runUtil, 
                long timeoutMs, 
                OutputStream stdout, 
                OutputStream stderr, 
                String... command)

ssh を使用してリモート インスタンスでコマンドを実行します。

パラメータ
host String

user String

sshPrivateKey File

runUtil IRunUtil: コマンドを実行する IRunUtil。

timeoutMs long: フェッチが完了するまでの時間(ミリ秒単位)

stdout OutputStream: stdout がロギングされる OutputStream。

stderr OutputStream: stderr がロギングされる OutputStream。

command String: 実行されるコマンド。

戻り値
CommandResult ステータスとログを含む CommandResult。