Its been 3 hours that I try to make this work. I found a lot of similar question on serverfault but any answer seem to solve my issue?
There is the ssh debug:
jfnault@jfnault-FX6840:~$ ssh -v md-web01
OpenSSH_5.9p1 Debian-5ubuntu1.4, OpenSSL 1.0.1 14 Mar 2012
debug1: Reading configuration data /home/jfnault/.ssh/config
debug1: /home/jfnault/.ssh/config line 1: Applying options for md-web01
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 54.186.190.242 [54.186.190.242] port 22.
debug1: Connection established.
debug1: identity file /home/jfnault/.ssh/md-web01.pem type -1
debug1: identity file /home/jfnault/.ssh/md-web01.pem-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.2
debug1: match: OpenSSH_6.2 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.9p1 Debian-5ubuntu1.4
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ECDSA 72:0c:39:9f:e2:64:39:0d:51:f1:95:b6:81:9d:b2:be
The authenticity of host '54.186.190.242 (54.186.190.242)' can't be established.
ECDSA key fingerprint is 72:0c:39:9f:e2:64:39:0d:51:f1:95:b6:81:9d:b2:be.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '54.186.190.242' (ECDSA) to the list of known hosts.
debug1: ssh_ecdsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: private/md-web01
debug1: Authentications that can continue: publickey
debug1: Trying private key: /home/jfnault/.ssh/md-web01.pem
debug1: read PEM private key done: type RSA
debug1: Authentications that can continue: publickey
debug1: No more authentication methods to try.
Permission denied (publickey).
~/.ssh/config:
Host md-web01
ChallengeResponseAuthentication yes
HostName 54.186.190.242
User ec2-user
IdentityFile ~/.ssh/md-web01.pem
.ssh folder permission :
jfnault@jfnault-FX6840:~$ ls -lad .ssh/
drwxr-xr-x 3 jfnault jfnault 4096 Oct 19 11:44 .ssh/
.ssh files permission :
-rw------- 1 jfnault jfnault 404 Feb 16 2014 authorized_keys
-rw------- 1 jfnault jfnault 140 Oct 19 11:38 config
-rw-r--r-- 1 jfnault jfnault 222 Oct 19 11:44 known_hosts
-r-------- 1 jfnault jfnault 1696 Oct 19 11:38 md-web01.pem