manage an interactive script on a remote host

OS~AIX 6.1
I'm running an interactive shell script i.e.,waits for a user response a few times while executing, after doing ssh to a AIX server. I'm just wondering what options I have if the ssh connection to the server is lost while executing the script, do I have to run the script again, which in my case is not feasible or is it possible to continue from the point where it was disconnected, if so, what would be the best way to do it ?

Thanks
mbak

This maybe helpful:

[root@node1 ~]# cat file 
sleep 3
echo test
read p << EOF
remote connection
EOF

echo ${p}
[root@node1 ~]# bash file
test
remote connection
[root@node1 ~]# ssh node2 "bash -s" < file &
[1] 3035
[root@node1 ~]# wait
test
remote connection
[1]+  Done                    ssh node2 "bash -s" < file

Use expect command