I found identically the same problem.  I think it is because you  are not
able to tell ssh-2.2.0  "no-pty" as you could with ssh-1.2.27

For me the cron job works, but it does give these errors.

So, I just made the errors "go away" but adding  " > /dev/null 2>&1 "
to my cron job.

It isn't pretty, but until a fix comes along it works.

Gary



Stephen Meatheringham wrote:
> Subject: Error: You have no controlling terminal.Can't initialize
readline
> I have just upgraded from ssh 1.something to 2.2.0 on my Sun unix
machines
> (Solaris 7).  I have a script which runs by hand with no worries,
however, it
> gives me errors when run via cron - simply because I don't have a tty
attached.
>
> For example, doing "ssh user@remote host /bin/w -u"  gives the output
as:
> You have no controlling terminal.Can't initialize readline for
confirmations.
>  11:08am  up 15 day(s),  2:24,  5 users,  load average: 0.26, 0.12, 0.08
>
> The error is coming from ssh2.c where it tries to open /dev/tty and
fails.
> Looking at the ssh man pages I thought adding a "-t" would allocate a
tty.
> But no luck there.  Apart from hacking the source code to comment out
that test
> does anyone have any suggestions?
>
> Thanks in advance
>
> Stephen Meatheringham
>-- End of excerpt from Stephen Meatheringham


Reply via email to