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입니다.