How can i terminating expect script without terminating SSH connection.

Hi all , i know i ask a lot of question but these are really hard to solve and important question. I send two scripts:

expect.sh:
#!/usr/local/bin/expect
spawn ssh root@172.30.64.163

expect "login:"
send "root\n"
expect "password:"
send "root\n^M"

interact

and

son.sh:

#!/usr/bin/ksh
./expect
if(($(df -k | grep /tmp | awk '{print $4}')<2500000000))
then
exit
email.sh
fi

I am sorry but could not find to send scripts in better way.

Now my problem is after executing ./son.sh it goes into "expect.sh" and login but it does not end the "expect" script so it could not continue on "son" script.Also "son" script should work on remote machine. Therefore how can i end the "expect" script without terminating ssh connection.

Have you tried <ctrl>+<d>, that is the ctrl key and the d key together?

Thanks but did ctrl+D. it terminates ssh connection. not script.