reinstall ssh through cydia, enter in ssh and verify if is present the file /bin/poc-bbot
if is present your iphone could be infected by worm ikee that kill your ssh at regular interval.
Let me know if this is your problem. I had the same problem with iphone4 and with removal procedure seems to work fine.