开发者

Running perl script with Net::SSH::Expect package in cygwin environment from DOS CMD

I am sucessed to run the Perl script which uses Net::SSH::Expect package from the cygwin command prompt. but i want to schedule the same script through the task schedular of windows 2003 or throught the crontab of cygwin or to run from DOS command prompt the script is failing in middle with below error.

Error:

SSHAuthenticationError Login timed out. The input stream currently has the conte
nts bellow: Pseudo-terminal will not be allocated because stdin is not a termina
l.
at /usr/lib/perl5/site_perl/开发者_运维知识库5.10/Expect.pm line 828

Password:

can any body help me out in this.. Thanks in advance. kishore.


You need to either force or disable the allocation of the pseudy TTY in your command line which launches SSH, by passing the -T or -t option to SSH. From the SSH man page:

 -T      Disable pseudo-tty allocation.

 -t      Force pseudo-tty allocation.  This can be used to execute arbi-
         trary screen-based programs on a remote machine, which can be
         very useful, e.g. when implementing menu services.  Multiple -t
         options force tty allocation, even if ssh has no local tty.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜