• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 603
  • Last Modified:

How can I troubleshoot a vbscript calling plink to a linux server?

I'm using vbscript "run" command to call plink and fire off a script on a linux host.  I can send standard linux commands, and everything works fine, but I cannot get their custom bash script to fire.  Does anyone know of any way to watch what is happening from the vbscript to the linux machine?  I'm storing StdOut and capturing that, but if I enter an invalid command, StdOut is NOT populated!  

The goal is to connect from a script to a linux host and fire off a script... needs to be automated, hence the use of plink.

any suggestions are GREATLY apprediated.
0
tmcmulli
Asked:
tmcmulli
  • 4
1 Solution
 
komarCommented:
Try installing Wireshark and capture all network traffic including plink<->linux server communication. This way I hope you can see what went wrong and when/why.

From my experience, most of the time the cause of this kind of problem is unexpected delays from the linux server when responding commands; unless your script waits for the previous command to finish then the next command will not be executed as expected.

This short tutorial video may help you get started with Wireshark.
0
 
tmcmulliAuthor Commented:
That makes sense, I can do that...  They also have their script returning "1" on several different sections, if I can get them to return different error codes, I may be able to track it down.  

Thanks for the suggestion!
0
 
tmcmulliAuthor Commented:
I also found that I can log the putty session and all the SSH packets via some options in the connection logging.  I think that will be a little better than wireshark, since my connection is encrypted.
0
 
tmcmulliAuthor Commented:
Solved by doing some troubleshooting and realizing that the putty session names are linked to the logged-in user, so that if you set up your connections under one user (as we were doing) and your process uses another user, say a service account, your sessions won't exist.  Login as your target user and save the putty session there.
0
 
tmcmulliAuthor Commented:
Other suggestion did not work or help... Wireshark will not show encrypted connections meaningfully.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now