RemoteSshUtil

public class RemoteSshUtil
extends Object

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


यह रिमोट इंस्टेंस पर एसएसएच कमांड चलाने की सुविधा देता है.

खास जानकारी

सार्वजनिक कंस्ट्रक्टर

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: एक OutputStream, जहां stdout को लॉग किया जाएगा.

stderr OutputStream: एक OutputStream, जहां stderr को लॉग किया जाएगा.

command String: वह कमांड जिसे चलाना है.

रिटर्न
CommandResult CommandResult, जिसमें स्टेटस और लॉग शामिल होते हैं.