Skip to main content
the OP apparently couldn't reach for the Shift key...
Source Link

thisThis is my shell script

#!/bin/bash
echo "Content-type: text/plain"
echo ""

sshpass -p $pass ssh -v -p $port -t -o StrictHostKeyChecking=no root@$ip "cd / && ls && exit"

It can be executed via web can be executed, or via command line.

whenWhen executed via command line iI see lots of output.. including debug info from "-v" ( verboseverbose mode  ) and, etc.

butBut when executed via web.. all i, all I see is the listing of folders. ( executedexecuted command's output  )

no. No other data..

whyWhy is the extended data missing when iI execute this script via web  ? whyWhy is it there when iI execute it via command line  ?

howHow can iI make sure it is also there when executed via web  ?

this is my shell script

#!/bin/bash
echo "Content-type: text/plain"
echo ""

sshpass -p $pass ssh -v -p $port -t -o StrictHostKeyChecking=no root@$ip "cd / && ls && exit"

can be executed via web can be executed via command line

when executed via command line i see lots of output.. including debug info from "-v" ( verbose mode  ) and etc.

but when executed via web.. all i see is the listing of folders. ( executed command's output  )

no other data..

why is the extended data missing when i execute this script via web  ? why is it there when i execute it via command line  ?

how can i make sure it is also there when executed via web  ?

This is my shell script

#!/bin/bash
echo "Content-type: text/plain"
echo ""

sshpass -p $pass ssh -v -p $port -t -o StrictHostKeyChecking=no root@$ip "cd / && ls && exit"

It can be executed via web, or via command line.

When executed via command line I see lots of output.. including debug info from "-v" (verbose mode), etc.

But when executed via web, all I see is the listing of folders (executed command's output). No other data.

Why is the extended data missing when I execute this script via web? Why is it there when I execute it via command line?

How can I make sure it is also there when executed via web?

edited tags; edited title
Link
Gilles 'SO- stop being evil'
  • 865.4k
  • 205
  • 1.8k
  • 2.3k

Executing Shell Script via Web .. Verbose output differs from normal execution via command line .. ( missing verbose and other data )when executing a script as CGI

edited tags
Link
Oou
  • 11
  • 1
Source Link
Oou
  • 11
  • 1
Loading