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: http://the.earth.li/~sgtatham/putty/0.58/htmldoc/Chapter7.html

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs