I am not able to login to my Server (ec2 instance). Before this I was able to login. No changes has been made to server or Security groups ! Is this issue from aws side ? Does it happens suddenly that sometimes you are not able to connect to your ec2 instance and need reboot or is it a security flaw due to which someone may be tampering my keys on server ?
ashish@ashishk:~/MyScripts$ ./test.ssh
OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to test.ige.com [ipxxxxx] port 22.
debug1: Connection established.
debug1: identity file /home/ashish/Keys/igepune.pem type -1
debug1: identity file /home/ashish/Keys/igepune.pem-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2
My login script :
ashish@ashishk:~/MyScripts$ cat ./test.ssh
ssh ubunt@ipxxxxx -v -i ~/Keys/igepune.pem
Out Put with -vvv
:
ashish@ashishk:~/MyScripts$ ./test.ssh
OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to test.ige.com [ipxxxx] port 22.
debug1: Connection established.
debug3: Incorrect RSA1 identifier
debug3: Could not load "/home/ashish/Keys/igepune.pem" as a RSA1 public key
debug1: identity file /home/ashish/Keys/igepune.pem type -1
debug1: identity file /home/ashish/Keys/igepune.pem-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2
**ashish@ashishk:~/MyScripts$ ll /home/ashish/Keys/igepune.pem**
-r-------- 1 ashish ashish 1679 Apr 21 18:56 /home/ashish/Keys/igepune.pem
I have a doubt do Amazon expires pem keys after certain period of time ??
Could not load "/home/ashish/Keys/igepune.pem" as a RSA1 public key
is the indication that your key is not a RSA1 public key. It just means its not using old protocol version of SSH. Please post the detailed debug output.