Thanks everybody for your valuable inputs .
Quote:
I think that since ssh is non-interactive (not a controlling terminal) You can't have a terminal like session,
Yes, that explains everything. SSH session is non interactive, so I can't expect a TEST condition to work
within that ssh session.
Quote:
Do You even get a prompt for answer to Your read statement?
Nope !
And I thought about having the TEST condition OUT of the ssh session,( where everything works fine ), but I was trying to avoid multiple logins to the machine, and it seems that there's no escape. (Well, you can export the public/private keys to have a passwordless login to other machines, but there are situations where you can't always do that).
Anyway, better knowing how the things are, than spending days trying to figure out why it doesn't work the way you expect it to work.