RemoteSshUtil

public class RemoteSshUtil
extends Object

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


Dienstprogramm zum Ausführen von SSH-Befehlen auf Remoteinstanzen.

Zusammenfassung

Öffentliche Konstruktoren

RemoteSshUtil()

Öffentliche Methoden

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

Führt einen Befehl auf der Remoteinstanz über SSH aus.

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

Führt einen Befehl auf der Remoteinstanz über SSH aus.

Öffentliche Konstruktoren

RemoteSshUtil

public RemoteSshUtil ()

Öffentliche Methoden

remoteSshCommandExec

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

Führt einen Befehl auf der Remoteinstanz über SSH aus.

Parameter
host String

user String

sshPrivateKey File

runUtil IRunUtil: Ein IRunUtil zum Ausführen von Befehlen.

timeoutMs long: In Millisekunden für den Abschluss des Abrufs

command String: Der auszuführende Befehl.

Gibt Folgendes zurück:
CommandResult Ein CommandResult mit dem Status und den Logs.

remoteSshCommandExec

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

Führt einen Befehl auf der Remoteinstanz über SSH aus.

Parameter
host String

user String

sshPrivateKey File

runUtil IRunUtil: Ein IRunUtil zum Ausführen von Befehlen.

timeoutMs long: In Millisekunden für den Abschluss des Abrufs

stdout OutputStream: Ein OutputStream, in dem die Standardausgabe protokolliert wird.

stderr OutputStream: Ein OutputStream, in dem die Standardfehlerausgabe protokolliert wird.

command String: Der auszuführende Befehl.

Gibt Folgendes zurück:
CommandResult Ein CommandResult mit dem Status und den Logs.