Question : stty not working in expect script when run remotely via ssh

When executing an expect script remotely using ssh, stty does not work.
I get the following error message:
stty: impossible in this context are you disconnected or in a batch, at, or cron script?stty: ioctl(user): bad file number

I have an expect script on system A that executes via SSH another expect script on system B that executes SSH & SCP commands on system C.

The basic scenario is a store has 5 registers and 1 managers workstation.
When the managers workstation closes for the day it executes a script on the corporate server that in turn executes expect scripts to download files from each register to the corporate server.  This is all done using ssh, scp and expect.

The passphrase is being displayed when connecting to system C (the registers).

The managers workstation needs to initiate the download because of the number of stores, corporate would not be able to process the data running the stores individually.

Is there a way to make stty -echo work in a remote expect script using ssh?
This is running through Cygwin.

TIA,
Dan

Answer : stty not working in expect script when run remotely via ssh

well it should be possible, but it would be much easier if you manage to create a small test case,

One thing you could verify,:
if you add hte switch -t
to a ssh command you force a tty allocation and should thus be able to use commands like
stty -echo



Random Solutions  
 
programming4us programming4us