Re: Login, su to root, execute command - WeOnlyDo Discussion board

Re: Login, su to root, execute command (General questions)

by woddrazen, Monday, June 23, 2008, 11:50 (5788 days ago) @ shin

Shin,


Please try this:
[code]<

set ssh = CreateObject( WeOnlyDo.wodSSHCom.1 )
ssh.Login = name
ssh.Password = pwd
ssh.Hostname = ip
ssh.Blocking = 1
ssh.Protocol = 1
ssh.Port = 23
ssh.Timeout = 30
ssh.Connect

ssh.WaitFor regex:[$ #>] $ ,30
ssh.Send rsh server2 & vbLf
ssh.DataReady = 0
ssh.WaitFor regex:[$ #>] $ ,30
a = ssh.Execute( ls & vbLf, regex:[$ #>] $ ,30)
ssh.Disconnect

response.write a

>[/code]
Drazen


Complete thread: