Cannot ssh after assigning elastic ip

I configured my instance. It works and works. I can use ssh with my key (prepared by a chef / knife) before assigning an elastic IP. For example, this works (before EIP):

ssh -F .ssh/config ec2-ww-xx-yy-zz.us-west1.computer.amazonaws.com

After assigning EIP, I get a:

Permission denied (publickey)

as a check of my home folder for the key instead of the project directory.

I even pointed out the config directory and EIP:

ssh -F .ssh/config ubuntu@ww.xx.yy.zz -v

which returns a connection timeout message.

When I use Elastic Fox, I see that EIP was correctly associated. Am I missing an AWS installation that fails SSH in EIP?

+6
source share
1 answer

After starting the EC2 instance, it will assign a public and private IP address. The private IP address of an instance will never change over the lifetime of this instance. However, its public DNS address may change under certain circumstances.

So, after you have associated EIP with any instance, use this IP address to enter your computer.

+6
source

Source: https://habr.com/ru/post/890180/


All Articles