So i have making a control panel of sorts with php on my webserver that is able to send commands to my dedicated server (remote server) via ssh2.
This works fine, however i have noticed that after a few times of it reconnecting to ssh2 it stops working and just times out on the connection. (It also does not work trying to ssh directly from the server to the target)
I have flushed iptables but that seems to have no effect.
I checked auth.log and the system log but neither seem to show up anything about the failed connection.
The target server is running Ubuntu 16.04 and is an OVH server.
Could someone please offer suggestions on things i could try/check to resolve this issue? I thought since it's an OVH server it might be getting picked up by their Anti-DDoS but as far as i am aware, there is no way for me to check that.
Traceroute to port 22 from the webserver - Unsuccessful
# traceroute -n -T -p 22 TARGET
traceroute to TARGET (TARGET), 30 hops max, 60 byte packets
1 * * *
2 185.145.200.13 0.293 ms 0.277 ms 0.316 ms
3 185.145.200.11 0.195 ms 0.188 ms 0.208 ms
4 * * *
5 91.121.128.92 9.393 ms * *
6 * * *
until 30 * * *
Traceroute to port 22 from the webserver - Successful
traceroute -n -T -p 22 TARGET
traceroute to TARGET (TARGET), 30 hops max, 60 byte packets
1 * * *
2 185.145.200.13 0.335 ms 0.352 ms 0.297 ms
3 185.145.200.11 0.273 ms 0.267 ms *
4 * * *
until
30 * * *