Not getting correct exit status code (ExitStatus) (wodSSH / wodSSH.NET)
Hi,
I'm using wodSSH in my ASP pages. My problem is ExitStatus property. It is not showing correct exit status. It always show me 0. If I check on server using echo $? then I get correct exit status codes.
I'm using Execute method to execute commands on server (unix).
Please let me know why is this happening? Am I doing something wrong in my ASP script?
Here is the snippet from function I made:
--------------------------------
Set oSSH = Server.CreateObject( WeOnlyDo.wodSSHCom.1 )
oSSH.Blocking = 1
oSSH.LicenseKey = WOD_LICENSE_KEY
'set access details
oSSH.Hostname = sHostName
oSSH.Login = sLogin
oSSH.PrivateKey = oSSHKey
'settings for connection
oSSH.Authentication = 2
oSSH.Protocol = 3
oSSH.Encryption = 7
oSSH.Compression = 6
'Make connection
oSSH.Connect
'shell info
oSSH.WaitFor sWaitFor
oSSH.Prompt = sPrompt
'execute command
sOutput = oSSH.Execute(sCommand & vbLf)
sOutput = sOutput & Exit code: & oSSH.ExitStatus
'disconnect the session
oSSH.Disconnect
--------------------------------
Do any settings on SSH server needs to be tweak for ExitStatus property to work?
Do I need to change anything in my code?
Also, is there any place where I can find example ASP codes?
Thanks in advance.
Regards,
Jatin
Complete thread:
- Not getting correct exit status code (ExitStatus) - Jatin Mehta, 2006-03-10, 09:39
- Re: Not getting correct exit status code (ExitStat - wodSupport, 2006-03-10, 12:32
- Re: Not getting correct exit status code (ExitStat - Jatin Mehta, 2006-03-11, 04:53
- Re: Not getting correct exit status code (ExitStat - Jatin Mehta, 2006-03-11, 05:20
- Re: Not getting correct exit status code (ExitStat - wodSupport, 2006-03-11, 20:09
- Re: Not getting correct exit status code (ExitStat - Jatin Mehta, 2006-03-13, 04:18
- Re: Not getting correct exit status code (ExitStat - wodSupport, 2006-03-11, 20:09
- Re: Not getting correct exit status code (ExitStat - Jatin Mehta, 2006-03-11, 05:20
- Re: Not getting correct exit status code (ExitStat - Jatin Mehta, 2006-03-11, 04:53
- Re: Not getting correct exit status code (ExitStat - wodSupport, 2006-03-10, 12:32