远程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 。 |