Can’t say without some info where you’re connecting. If it’s a publicly available external server, this is most probably a network connectivlty issue or packet filtering at the remote server. See e.g.
for the tools you can use to diagnose network problems.