Raspberry pi connected to internet ,router can ping raspberry pi but i cant ssh into my pi

i was thinking my raspberry pi loosing connection to internet but its not

i run script which ping google and my router and if fails then reboot

but my raspberry pi is connected to internet and my router is able is ping raspberry pi ,so all my script cant able to help

its a different problem ,and i cant any solution on internet

i just cant able to ssh my pi , so the main culprit is releated to ssh

now what to do ??
anyone faces this problem??
should i made another script that restart ssh service every 30 min ??

3 posts were merged into an existing topic: Need help about cron job and its capability