Amazon web services: You can ssh to the EC2 instance but you can not eb ssh

When I try SSH to a certain of my EC2 instances, it works fine:

ssh -i "jason.pem" ec2-user@ec2-34-222-8-173.us-west-2.compute.amazonaws.com
# the previous works

When I try to do eb ssh It does not work Interestingly, it worked for months before today, but now it does not work, although I can not imagine that something has changed. Here is the failure:

INFO: Trying to open port 22.
INFO: SSH port 22 open.
INFO: Running ssh -i /Users/jasonswett/.ssh/jason.pem ec2-user@34.222.8.173
ec2-user@34.222.8.173: Permission denied (publickey).
ERROR: An error occurred while executing: ssh.

How can i fix this?

Edit:

I have isolated the problem to some extent.

This works:

ssh -i & jason.pem & # 39; ec2-user@34.222.8.173

but this does not

ssh -i /Users/jasonswett/.ssh/jason.pem ec2-user@34.222.8.173

So, obviously, the difference is the value of what is passed for the -I flag. Unfortunately it is the second command that does not work eb ssh Currently uses.

What I still do not understand is why this makes a difference or what I can do to solve the problem.