this is what i want to do :
#!/bin/bash
# start the tunnel
ssh tunnel@hostA -L 6000:hostB:22 -N
# this is the problem, i need to go next process after tunnel on
# Main proses that i must run under tunnel command
sftp -oPort=6000 user@localhost:/home/you <<GETME
lcd /home/me/temp
get *.tar
bye
GETME
echo " Job Done"
# i hope it can be add
# kill the tunnel after sftp done
right now i use 2 putty to run sftp to hostB, i think maybe it can be done in 1 single script