Have an expect script but can't seem to de-bug it. It's stalling at the password prompt. If anyone can see a mistake, kindly let me know. Thanks.
Here is the error:
spawn ssh -o StrictHostKeyChecking=no user@xx.xx.xx.xx rpm -qa
# Warning! You have entered into a secured area! #
# All activities on this system are logged. #
user@xx.xx.xx.xx's password:
send: spawn id exp4 not open
while executing
"send "!\r""
Generally, trying to work around SSH restrictions is not a good idea. Can you not create an SSH key pair and set the public part as an authorised key to log in seamlessly to the server?
The SSH restrictions are there for a good reason. What have you tried to enable the use of SH keys so far, and what errors did you get?