As to your error, you may need a pseudo tty, called a pty. Google for it. There is a perl module IO::Pty , but in the case of ssh2, you really should switch to a Perl method like Net::SSH2 Certain programs are written to make sure it has a terminal to output to. The program "top" is like that, you will get the same error as yours, unless you use IO::Pty.
| [reply] |
You make no effort to phrase your question in a way that anyone can really answer you (not even spell-checking your title).
So why o why should I or anyone else make any effort to answer you?
Post a small example of your code that produces this error and add any explanation you feel is needed to explain your problem.
also read How do I post a question effectively?
grep
One dead unjugged rabbit fish later...
| [reply] |
Perl does not require STDIN to be a TTY.
We'd need to know more such as what generated this error.
| [reply] |
my code is like this
#!/usr/bin/perl
@a =`ssh -t 192.168.2.9 -l manoj -C su cvs<<EO
access123
access
EO`;
print "@a\n";
OUTPUT
Pseudo-terminal will not be allocated because stdin is not a terminal.
with this asking for a password.
Can we restrict this prompt with this program.
| [reply] |
| [reply] |