RemoteSshUtil

public class RemoteSshUtil
extends Object

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


Utilità per eseguire comandi ssh su istanze remote.

Riepilogo

Costruttori pubblici

RemoteSshUtil()

Metodi pubblici

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

Esegui un comando sull'istanza remota utilizzando ssh.

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

Esegui un comando sull'istanza remota utilizzando ssh.

Costruttori pubblici

RemoteSshUtil

public RemoteSshUtil ()

Metodi pubblici

remoteSshCommandExec

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

Esegui un comando sull'istanza remota utilizzando ssh.

Parametri
host String

user String

sshPrivateKey File

runUtil IRunUtil: un IRunUtil per eseguire i comandi.

timeoutMs long: in millisecondi per il completamento del recupero

command String: il comando da eseguire.

Resi
CommandResult Un CommandResult contenente lo stato e i log.

remoteSshCommandExec

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

Esegui un comando sull'istanza remota utilizzando ssh.

Parametri
host String

user String

sshPrivateKey File

runUtil IRunUtil: un IRunUtil per eseguire i comandi.

timeoutMs long: in millisecondi per il completamento del recupero

stdout OutputStream: un OutputStream in cui verranno registrati i log di stdout.

stderr OutputStream: un OutputStream in cui verranno registrati i log di stderr.

command String: il comando da eseguire.

Resi
CommandResult Un CommandResult contenente lo stato e i log.