Can't see output in SSH

From: Nuggy (nosenugget_at_excite.com)
Date: 11/21/03

  • Next message: Vahid: "openssh-SNAP-20031118"
    Date: 21 Nov 2003 13:16:49 -0800
    
    

    I am having problems with seeing output from a program using SSH.

    I need to pass in a script to execute. Inside the script, an
    executable program is called, which starts up an interactive
    data-entry session with the user (display question, read input, rinse,
    repeat).

    If I use putty from the command line without calling the script, I get
    my prompt, and can run the script and see the program execute just
    fine. But if I pass in a command file with the script in it, the
    script still executes, it displays output from the script just fine,
    and runs the executable, but the output from the executable is not
    displayed on my screen immediately.

    It can still accept input.. I can I can respond to prompts I know are
    there, and it will accept and respond to my keystrokes.. but I never
    see the output, UNTIL the executable finishes, as which point all the
    output that it produced flashes briefly in the window before the
    window closes.

    I am seeing identical behavior using MindTerm's SSH java client which
    I have integrated into a java application. The window comes up and
    displays shell output fine, but the executable's output isn't shown
    until it's in the process of closing the window when it completes.

    Again, with either putty or mindterm, if I don't pass in the command
    to execute, I get my UNIX prompt, and I can type in the command to
    start the script, and I see and can interact with the executable just
    fine. It's only when I pass in the script to run that I can't see the
    executable's output.

    What am I missing? I need to have this dynamic; having to type in the
    command at the prompt each time is not an option. Please help!

    my putty command line that works but I have to type in the command:

    c:\putty.exe.lnk -ssh -t -l <user> -pw <pw> -2 <host>

    The other one I tried that won't display the executable output:

    c:\putty.exe.lnk -ssh -t -l <user> -pw <pw> -2 -m c:\cmdfile <host>
    where "c:\cmdfile" is a text file containing the path to the UNIX
    script to run.

    I'd much rather use MindTerm since I've already integrated the
    BasicClient into my application, as I don't really want to have 50
    different "cmdfile"s on my drive for the many different commands I
    will be running, so though I appreciate any help on either putty or
    mindterm, information to help me get mindterm working would be
    awesome.

    Thanks!

    -Nuggy


  • Next message: Vahid: "openssh-SNAP-20031118"

    Relevant Pages

    • Re: shell scripting
      ... and am assuming an sh-compatible shell here.... ... command 1 options arguments ... To run the script, do: ... then you need to use the full path to execute it: ...
      (comp.unix.questions)
    • Re: shell scripting
      ... and am assuming an sh-compatible shell here.... ... command 1 options arguments ... To run the script, do: ... then you need to use the full path to execute it: ...
      (comp.unix.shell)
    • =?iso-8859-1?Q?Re:_Jcl?=
      ... I can send you a program that you execute as a step in your job and it ... I have a command and job scheduler that is available in a free version ... demand script processor with the full scripting ability so that your job ...
      (bit.listserv.ibm-main)
    • Re: sms installer- automate installing local printer
      ... Thanks Terry- Here is the script that I used that seemed to work- I just had ... > However since you are asking about getting the command line to work we can ... execute program this is where you are making the most mistakes. ...
      (microsoft.public.sms.installer)
    • Re: Will Linux become as vulnerable as MS ??
      ... > beeing vulnerable to viruses. ... > that they know are executable, and execute intentionally. ... >> Linux, each distro is a little different, and even within the distro, ... > Since clicking on a script is easier than typing it's name, ...
      (comp.os.linux.security)