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

Posted on 2011-10-27
Last Modified: 2012-05-12
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.
Question by:tmcmulli
    LVL 3

    Expert Comment

    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.

    Author Comment

    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!

    Author Comment

    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.

    Accepted Solution

    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.

    Author Closing Comment

    Other suggestion did not work or help... Wireshark will not show encrypted connections meaningfully.

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    When it comes to writing scripts for a Client/Server computing environment it is essential to consider some way of enabling the authentication functionality within a script. This sort of consideration mainly comes into the picture when we are dealin…
    The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
    Viewers will learn how to properly install and use Secure Shell (SSH) to work on projects or homework remotely. Download Secure Shell: Follow basic installation instructions: Open Secure Shell and use "Quick Connect" to enter credentials includi…
    This video discusses moving either the default database or any database to a new volume.

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now