Not able to enter commands in putty window

Hi,

I am not able to enter any commands in putty window using ruby code. I
have used the below code to open the putty window. Please help me how to
execute the commands inside this.

require ‘net/ssh’
require ‘ssh’
require ‘win32ole’

wsh = WIN32OLE.new(‘Wscript.Shell’)
$cmds = wsh.Run(‘putty -ssh Jackets’)

Please let me know how to proceed with login and basic commands to
execute.

Regards,

Sachin

Hi Sachin,

I think what you need is the command-line version of PuTTY called
plink which is more suitable for automated tasks.

See here: Using the command-line connection tool Plink

Regards,
Instinct

Sachin Dattatreya wrote in post #1178836:

Hi,

I am not able to enter any commands in putty window using ruby code. I
have used the below code to open the putty window. Please help me how to
execute the commands inside this.

require ‘net/ssh’
require ‘ssh’
require ‘win32ole’

wsh = WIN32OLE.new(‘Wscript.Shell’)
$cmds = wsh.Run(‘putty -ssh Jackets’)

Please let me know how to proceed with login and basic commands to
execute.

Regards,

Sachin