I need to connect to a remote server and the data they give me to do so is:
A web server name, a public IP, a private IP and a myUserName.pem cert.
To connect to the server I do:
ssh -v myUserName@publicIP
Also:
ssh -v -i /home/myUserName/.ssh/myUserName.pem myUserName@publicIP
but I always get a time-out error.
I check the vpn:
nmcli c show --active | grep vpn
I check the port 22:
sudo lsof -i:22
The state of ssh:
sudo service ssh status
All this works well.
I try a different port adding -p 443
to the ssh lines but I keep getting the error.
So I try the IPs with:
traceroute -e
and with the two IPs I get asterisks/stars at the end.
I check:
sudo ufw status
And shows inactive.
The rest of the people who try to access this server do it without any problem, so I understand that it is a problem in the code I use or in my Internet connection configuration. But I don't know how I should keep checking things out to be able to connect to this server. Any idea can help me a lot.
I'm using Ubuntu 20.04
Thank you very much!
nc <host> 22
. If not, fix your firewall / VPN connection.