-1

Actually, the only way I could access my AWS server is with the IPv4 DNS hostname:

ssh -i '~/.ssh/id_rsa.pub' something.compute.amazonaws.com

I would like to access it with the IPv4 Public IP, but I did not succeed in doing that so far. I tried using the simple command ssh my_ip, but nothing happened.

What do I have to modify on the configuration so that I can use the IP address to access the server.

pa4080
  • 29,831
J.Doe
  • 171

1 Answers1

0

That's because when you're using ssh to the IP, you're not using the key. Try

ssh -i "~/.ssh/id_rsa.pub" server_ip

Also, make sure you're using the external IP of the server

curl ipinfo.io/ip

(check out this question)

user8292439
  • 3,808