Re: Login, su to root, execute command (General questions)
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