Re: Login, su to root, execute command (General questions)
Hi, Drazen :
This is my test code.
It use telnet to to get the response from UNIX server.
But it works so strange.
Every time I run it, I can't get the same result.
<
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.Send rsh server2 & vbLf
ssh.WaitFor ,30
do while ssh.DataReady = 0
loop
a = ssh.Receive
ssh.Send ls & vbLf
ssh.WaitFor ,30
do while ssh.DataReady = 0
loop
b = ssh.Receive
ssh.disconnect
response.write a
response.write <br>---------------<br>
response.write b
>