ExecSshCommandExtension extension
Methods
-
channelReadAsString(ssh_session session, Pointer<ssh_channel_struct> channel, {int? limitLoop, Allocator allocator = calloc, bool isStderr = false, bool isPty = false, int? timeout, bool isCustomPty = false})
→ String
-
timeout
in Milliseconds para interromper o loop
isCustomPty
verifica se existe um "----ENDCMD----" na string retornada pelo server e interronpe o loop
isPty
verifica se existe um "#" or "$" prompts na string retornada pelo server e interronpe o loop
-
channelWrite(ssh_session session, Pointer<ssh_channel_struct> channel, String command, {Allocator allocator = calloc})
→ void
-
-
disposeSshChannel(ssh_channel channel)
→ void
-
-
execCommandOnChannel(ssh_session session, Pointer<ssh_channel_struct> channel, String command, {Allocator allocator = calloc, bool returnStderr = false})
→ String
-
-
execCommandsInShell(ssh_session session, List<String> commands)
→ List<String>
-
experimental as it may not be able to detect the prompt
execute commands in the interactive shell the order of execution is based on the order of the command list
and return a list with the response of each command in the order of execution
-
execCommandSync(ssh_session session, String command, {Allocator allocator = calloc, bool returnStderr = false})
→ String
-
execute only one command
to execute several commands
start a scripting language
example:
execCommandSync(session,"cd /tmp; mkdir mytest; cd mytest; touch mytest");
-
initShell(ssh_session session, Pointer<ssh_channel_struct> channel)
→ void
-
-
initSshChannel(ssh_session session)
→ ssh_channel
-