aha the reason that does not work is the  f option that option specifically requests that  ssh  fork a child and put it in the background  defeating i think you can use this instead ssh  n  i n ssh pid 