I started a process from one ssh session to a target machine T. The system from which I ssh'ed, A, hung. I checked using ssh from another machine, B that the process is still running on T. Now I want to be able to restart A without affecting the run of the process on T. I had forgotten to use screen or byobu etc. Since A is currently hung, I cant even do a ctrl z and disown or something. What can be done ? I dont want the process to terminate but I want to be able to restart A which has hung.

You might modify the file descriptors attached to that process but, in general, doing so requires some a bit dirty tricks to be used. The whole concept is quite nicely covered in this question. Whether running a program like retty will succeed in your case, depends on how rigorously the process monitors the status of its own file descriptors.