1

I am trying to grep the Oracle golden gate from a remote machine, But along with version it is giving some error details also, How do I resolve it ?

user@serverhost:/dbei > echo  <golgengate install path>/ggsci | ssh gger@payhlc203 | grep "Version"

Pseudo-terminal will not be allocated because stdin is not a terminal.
stty: standard input: Invalid argument
Version 11.2.1.0.3 14400833 OGGCORE_11.2.1.0.3_PLATFORMS_120823.1258_FBO
Arn
  • 13
  • 5

2 Answers2

1

Use the -T option to ssh;

-T Disable pseudo-tty allocation.

from the manpage.

Jenny D
  • 27,780
  • 21
  • 75
  • 114
Chris Rees
  • 275
  • 1
  • 7
0

Even if you disable pseudo-tty allocation (-T option), you may still get the Invalid argument error.

It looks like ggsci is an interactive program that expects some input. You might try something like this instead:

echo | ssh gger@payhlc203 /path/to/goldengate/ggsci | grep Version

Failing that, you can always get rid of the extraneous output by redirecting stderr, eg:

echo | ssh gger@payhlc203 /path/to/goldengate/ggsci 2>/dev/null | grep Version
fission
  • 3,601
  • 2
  • 21
  • 31