How to running test script using ssh

hi guys,

i have a case, my script running to database connect to ssh. when running, first must activate ssh database before running test script but. after activate ssh, step open browser automaticly close. any suggestion for this case?

Regards,