I have the below script that works fine when run locally
cat /tmp/input.sh
echo -n ">> "
read env
exit;
I get the command prompt when i run as below.
$/tmp/input.sh | echo "whatever"
$
All good so far. The problem occurs when i run this script via ssh
ssh wladmin@myhost /tmp/input.sh | echo "whatever"
This system is for the use by authorized users only. All data contained
on all systems is owned by the company and may be monitored, intercepted,
recorded, read, copied, or captured in any manner and disclosed in any
manner, by authorized company personnel. Users (authorized or unauthorized)
have no explicit or implicit expectation of privacy. Unauthorized or improper
use of this system may result in administrative, disciplinary action, civil
and criminal penalties. Use of this system by any user, authorized or
unauthorized, constitutes express consent to this monitoring, interception,
recording, reading, copying, or capturing and disclosure.
IF YOU DO NOT CONSENT, LOG OFF NOW.
##################################################################
# *** This Server is using Centrify *** #
# *** Remember to use your Active Directory account *** #
# *** password when logging in *** #
##################################################################
As you see i expected control on the command prompt terminal i.e $
but unless i press Crtl + C
or others i do not get the command prompt to type further.
I tried ssh -T
option but that did not help.
Can you suggest what needs to be done?