Difference between revisions of "PluginConnectivityExamples"
From Autodrive
(Created page with "===Connectivity examples=== This section collects common examples. Connectivity is actual two plugins one for handling ssh and telnet and one for handling ftp. ==Create a ss...") |
|||
Line 42: | Line 42: | ||
==Setting up a socks proxy== | ==Setting up a socks proxy== | ||
+ | |||
+ | ==Socket timeout== | ||
+ | |||
+ | ==Command timeout== | ||
==Telnet== | ==Telnet== |
Revision as of 10:24, 15 June 2013
Contents
Connectivity examples
This section collects common examples. Connectivity is actual two plugins one for handling ssh and telnet and one for handling ftp.
Create a ssh session
/* * Connect to ipaddress and store result of executing whoami on the remote host */ SCRIPT:javascript importPackage( Packages.dk.autodrive.base ); importPackage( Packages.dk.autodrive.plugins ); var f = ''+at.loadJS("stdfunc.js"); eval(f); theObj = getPlugin(Packages.dk.autodrive.plugins.AD_Connectivity_Commands); theObj.createSSHSession('ipaddress','username','password'); var result = theObj.shellSend('whoami'); ENDSCRIPT
Connect to jumpserver
ToDo, complete examples.
SCRIPT:javascript importPackage( Packages.dk.autodrive.base ); importPackage( Packages.dk.autodrive.plugins ); var f = ''+at.loadJS("stdfunc.js"); eval(f); theObj = getPlugin(Packages.dk.autodrive.plugins.AD_Connectivity_Commands); theObj.jumpServerConnect('username','password','jumpserveripaddress'); ENDSCRIPT