Default [Q] Wake wi-fi on ssh connection

Hi,
I would like to achieve such function. I open filezilla on my pc, I turn on ssh connection with my locked phone, my phone wakes wi-fi only while the connection is active.
Is it possible to do this?

Any ideas?