遠端SSH工具
public class RemoteSshUtil
extends Object
java.lang.Object | |
↳ | com.android.tradefed.device.cloud.RemoteSshUtil |
在遠端執行個體上執行 ssh 指令的實用程式。
概括
公共構造函數 | |
---|---|
RemoteSshUtil () |
公共方法 | |
---|---|
static CommandResult | remoteSshCommandExec ( GceAvdInfo remoteInstance, TestDeviceOptions options, IRunUtil runUtil, long timeoutMs, OutputStream stdout, OutputStream stderr, String... command) 使用 ssh 在遠端實例上執行命令。 |
static CommandResult | remoteSshCommandExec ( GceAvdInfo remoteInstance, TestDeviceOptions options, IRunUtil runUtil, long timeoutMs, String... command) 使用 ssh 在遠端實例上執行命令。 |
公共構造函數
遠端SSH工具
public RemoteSshUtil ()
公共方法
遠端Ssh命令執行
public static CommandResult remoteSshCommandExec (GceAvdInfo remoteInstance, TestDeviceOptions options, IRunUtil runUtil, long timeoutMs, OutputStream stdout, OutputStream stderr, String... command)
使用 ssh 在遠端實例上執行命令。
參數 | |
---|---|
remoteInstance | GceAvdInfo :描述裝置的GceAvdInfo 。 |
options | TestDeviceOptions : TestDeviceOptions 描述用於 GCE 裝置的裝置選項。 |
runUtil | IRunUtil :執行指令的IRunUtil 。 |
timeoutMs | long :以毫秒為單位完成獲取 |
stdout | OutputStream :將記錄標準輸出ERROR(/OutputStream) 。 |
stderr | OutputStream :將記錄 stderr ERROR(/OutputStream) 。 |
command | String : 要執行的命令。 |
退貨 | |
---|---|
CommandResult | 包含狀態和日誌的CommandResult 。 |
遠端Ssh命令執行
public static CommandResult remoteSshCommandExec (GceAvdInfo remoteInstance, TestDeviceOptions options, IRunUtil runUtil, long timeoutMs, String... command)
使用 ssh 在遠端實例上執行命令。
參數 | |
---|---|
remoteInstance | GceAvdInfo :描述裝置的GceAvdInfo 。 |
options | TestDeviceOptions : TestDeviceOptions 描述用於 GCE 裝置的裝置選項。 |
runUtil | IRunUtil :執行指令的IRunUtil 。 |
timeoutMs | long :以毫秒為單位完成獲取 |
command | String : 要執行的命令。 |
退貨 | |
---|---|
CommandResult | 包含狀態和日誌的CommandResult 。 |