Elastic Beanstalk uses Auto Scaling groups to manage the underlying EC2 instances. The EC2 instances are managed behind an Elastic Load Balancer. At any time, an EC2 instance may be terminated and replaced. At any time, the Elastic Load Balancer may change it's IP address.
You should never need to SSH or RDP into the underlying EC2 instances if you are using Elastic Beanstalk.
Elastic Beanstalk is not intended to be deployed using SSH. Plain and simple. If you want to SSH into your EC2 instances to deploy your application, then don't use Elastic Beanstalk.
To properly use Elastic Beanstalk, you should upload your application version as a new "Elastic Beanstalk Version", and allow Elastic Beanstalk to deploy it to the EC2 instances.
There is a way to use git to push your application to Elastic Beanstalk, but there are very specific instructions for that.
You CAN use brute force git and SSH to deploy your application to EC2, but to do that, you should launch and manage the EC2 instance(s) yourself.