Trying to SSH into server and getting key_load_public: No such file or directory error
Clash Royale CLAN TAG#URR8PPP
up vote
28
down vote
favorite
I created a passwordless ssh connection to my remote server from my mac. It worked(!) and then I closed my terminal, re-opened it, tried again, and got the following (username, my_ip are not real):
ssh -vvv username@my_ip
OpenSSH_7.2p2, LibreSSL 2.4.1
debug1: Reading configuration data /Users/Me/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 20: Applying options for *
debug1: /etc/ssh/ssh_config line 53: Applying options for *
debug2: resolving "my_ip" port 22
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to my_ip [my_ip] port 22.
debug1: Connection established.
debug1: identity file /Users/Me/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/Me/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/Me/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/Mes/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/Me/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/Me/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/Me/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/Me/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.2
ssh_exchange_identification: read: Connection reset by peer
When I checked my .ssh
folder, id_rsa
was there but none of the others were. From the error, it looks like I need to somehow create these files but am not sure how to do so.
Any help would be appreciated.
ssh
add a comment |Â
up vote
28
down vote
favorite
I created a passwordless ssh connection to my remote server from my mac. It worked(!) and then I closed my terminal, re-opened it, tried again, and got the following (username, my_ip are not real):
ssh -vvv username@my_ip
OpenSSH_7.2p2, LibreSSL 2.4.1
debug1: Reading configuration data /Users/Me/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 20: Applying options for *
debug1: /etc/ssh/ssh_config line 53: Applying options for *
debug2: resolving "my_ip" port 22
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to my_ip [my_ip] port 22.
debug1: Connection established.
debug1: identity file /Users/Me/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/Me/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/Me/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/Mes/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/Me/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/Me/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/Me/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/Me/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.2
ssh_exchange_identification: read: Connection reset by peer
When I checked my .ssh
folder, id_rsa
was there but none of the others were. From the error, it looks like I need to somehow create these files but am not sure how to do so.
Any help would be appreciated.
ssh
Is there an actual problem? For example, are you actually failing to log in? Could you edit your question to include the complete debug output, instead of just the first part?
â Kenster
Nov 8 '16 at 22:18
Yes; my apologies! I can't log in -- and I had left off the last (and perhaps most important?) line earlier.
â Eric
Nov 8 '16 at 22:28
add a comment |Â
up vote
28
down vote
favorite
up vote
28
down vote
favorite
I created a passwordless ssh connection to my remote server from my mac. It worked(!) and then I closed my terminal, re-opened it, tried again, and got the following (username, my_ip are not real):
ssh -vvv username@my_ip
OpenSSH_7.2p2, LibreSSL 2.4.1
debug1: Reading configuration data /Users/Me/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 20: Applying options for *
debug1: /etc/ssh/ssh_config line 53: Applying options for *
debug2: resolving "my_ip" port 22
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to my_ip [my_ip] port 22.
debug1: Connection established.
debug1: identity file /Users/Me/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/Me/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/Me/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/Mes/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/Me/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/Me/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/Me/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/Me/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.2
ssh_exchange_identification: read: Connection reset by peer
When I checked my .ssh
folder, id_rsa
was there but none of the others were. From the error, it looks like I need to somehow create these files but am not sure how to do so.
Any help would be appreciated.
ssh
I created a passwordless ssh connection to my remote server from my mac. It worked(!) and then I closed my terminal, re-opened it, tried again, and got the following (username, my_ip are not real):
ssh -vvv username@my_ip
OpenSSH_7.2p2, LibreSSL 2.4.1
debug1: Reading configuration data /Users/Me/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 20: Applying options for *
debug1: /etc/ssh/ssh_config line 53: Applying options for *
debug2: resolving "my_ip" port 22
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to my_ip [my_ip] port 22.
debug1: Connection established.
debug1: identity file /Users/Me/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/Me/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/Me/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/Mes/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/Me/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/Me/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/Me/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/Me/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.2
ssh_exchange_identification: read: Connection reset by peer
When I checked my .ssh
folder, id_rsa
was there but none of the others were. From the error, it looks like I need to somehow create these files but am not sure how to do so.
Any help would be appreciated.
ssh
ssh
edited Nov 9 '16 at 7:24
Jakuje
16k52952
16k52952
asked Nov 8 '16 at 22:14
Eric
250136
250136
Is there an actual problem? For example, are you actually failing to log in? Could you edit your question to include the complete debug output, instead of just the first part?
â Kenster
Nov 8 '16 at 22:18
Yes; my apologies! I can't log in -- and I had left off the last (and perhaps most important?) line earlier.
â Eric
Nov 8 '16 at 22:28
add a comment |Â
Is there an actual problem? For example, are you actually failing to log in? Could you edit your question to include the complete debug output, instead of just the first part?
â Kenster
Nov 8 '16 at 22:18
Yes; my apologies! I can't log in -- and I had left off the last (and perhaps most important?) line earlier.
â Eric
Nov 8 '16 at 22:28
Is there an actual problem? For example, are you actually failing to log in? Could you edit your question to include the complete debug output, instead of just the first part?
â Kenster
Nov 8 '16 at 22:18
Is there an actual problem? For example, are you actually failing to log in? Could you edit your question to include the complete debug output, instead of just the first part?
â Kenster
Nov 8 '16 at 22:18
Yes; my apologies! I can't log in -- and I had left off the last (and perhaps most important?) line earlier.
â Eric
Nov 8 '16 at 22:28
Yes; my apologies! I can't log in -- and I had left off the last (and perhaps most important?) line earlier.
â Eric
Nov 8 '16 at 22:28
add a comment |Â
5 Answers
5
active
oldest
votes
up vote
40
down vote
accepted
debug1: key_load_public: No such file or directory
The line above is not error, but just simple debug log saying that ssh
client is not able to find separate public key (named ~/.ssh/id_rsa.pub
). This file is not needed to connect to the remote server, but it can be useful.
The actual error
ssh_exchange_identification: read: Connection reset by peer
points to error in server configuration. The server is running, but fails to accept the SSH connection. Check the server log for more information. Similar problems
That link was very helpful. And, it turns out that I was in fact blacklisted (I had ssh'ed into my server too many times while I was testing something out.)
â Eric
Nov 8 '16 at 22:47
1
My problem was a Bastion host had changed the IP address and theknown_hosts
was incorrect on my Mac... It showed@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
... It shows the line number by~/.ssh/known_hosts:238
. So, I removed that line, 238 in this case, from the known_hosts file on my Mac and I tried to connect again successfully.
â Marcello de Sales
Dec 14 '17 at 0:04
add a comment |Â
up vote
0
down vote
Same problem, just post the solution here
Remove Your IP From /etc/hosts.deny
using :
nano /etc/hosts.deny
add a comment |Â
up vote
0
down vote
Problem: bastion host IP mismatch on ~/.ssh/known_hosts
I had the known_hosts
file old as the IP address of the bastion changed...
$ ssh 10.82.49.24
ssh_exchange_identification: Connection closed by remote host
Did not give me any information. Looking at the verbose output leads to the same thing:
$ ssh -v 10.82.49.24
OpenSSH_7.4p1, LibreSSL 2.5.0
debug1: Reading configuration data /Users/mdesales/.ssh/config
debug1: /Users/mdesales/.ssh/config line 1: Applying options for 10.82.*.*
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Executing proxy command: exec ssh -q -W 10.82.49.24:22 ec2-user@bastion-vpc-xxxxxx.config-yyyyyyy.com -i ~/.ssh/xxxconfig-xxxx.pem
debug1: key_load_public: No such file or directory
debug1: identity file ~/.ssh/xxxconfig-xxxx.pem
debug1: key_load_public: No such file or directory
debug1: identity file ~/.ssh/xxxconfig-xxxx.pem-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.4
debug1: permanently_drop_suid: 1647059022
ssh_exchange_identification: Connection closed by remote host
At this point, since it is a proxy to another host through the bastion, I could see the bastion being a problem:
$ ssh ec2-user@bastion-vpc-xxxxxx.config-yyyyyyy.com -i ~/.ssh/xxxconfig-xxxx.pem
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
SHA256:Z8X1UlIgQ94BKJ7NA/oQi7v0NL4IlFeO7Ou4j76Zphk.
Please contact your system administrator.
Add correct host key in /Users/mdesales/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /Users/mdesales/.ssh/known_hosts:238
ECDSA host key for ec2-user@bastion-vpc-xxxxxx.config-yyyyyyy.com has changed and you have requested strict checking.
Host key verification failed.
Solution
Removing the entry on line 238 solved the problem... I could ssh to the bastion and I could ssh to the hosts.
$ vim /Users/mdesales/.ssh/known_hosts
$ ssh ec2-user@bastion-vpc-xxxxxx.config-yyyyyyy.com -i ~/.ssh/xxxconfig-xxxx.pem
The authenticity of host 'ec2-user@bastion-vpc-xxxxxx.config-yyyyyyy.com (34.x.x.y)' can't be established.
ECDSA key fingerprint is SHA256:Z8X1UlIgQ94BKJ7NA/oQi7v0NL4IlFeO7Ou4j76Zphk.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'ec2-user@bastion-vpc-xxxxxx.config-yyyyyyy.com -i ~/.ssh/xxxconfig-xxxx.pem,34.213.y.x' (ECDSA) to the list of known hosts.
********************************************************************************
This is a private computer system containing information that is proprietary
and confidential to the owner of the system. Only individuals or entities
authorized by the owner of the system are allowed to access or use the system.
Any unauthorized access or use of the system or information is strictly
prohibited.
All violators will be prosecuted to the fullest extent permitted by law.
********************************************************************************
Last login: Wed Aug 2 20:35:55 2017 from 10.81.31.115
[ec2-user@ip-10-82-50-142 ~]$
add a comment |Â
up vote
0
down vote
Happened to me today.
Fixed by disconnecting my WLAN and reconnecting. Yes, it sounds stupid and it is stupid but at least on one WLAN this has happened with no any good reason.
add a comment |Â
up vote
0
down vote
I am having the same issue. Can anyone help.
Below is the complete detail, I gave permission on the file using $chmod 600
> OpenSSH_7.7p1, LibreSSL 2.7.3 debug1: Reading configuration data
> /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 48: Applying
> options for * debug1: Connecting to 35.161.126.138 [35.161.126.138]
> port 22. debug1: Connection established. debug1: permanently_set_uid:
> 0/0 debug1: key_load_public: No such file or directory debug1:
> identity file
> /Users/waqas80/Documents/EnfocarSoft/awskeys/awsoregon.pem type -1
> debug1: key_load_public: No such file or directory debug1: identity
> file /Users/waqas80/Documents/EnfocarSoft/awskeys/awsoregon.pem-cert
> type -1 debug1: Local version string SSH-2.0-OpenSSH_7.7 debug1:
> Remote protocol version 2.0, remote software version OpenSSH_7.6p1
> Ubuntu-4 debug1: match: OpenSSH_7.6p1 Ubuntu-4 pat OpenSSH* compat
> 0x04000000 debug1: Authenticating to 35.161.126.138:22 as 'ubuntu'
> debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received
> debug1: kex: algorithm: curve25519-sha256 debug1: kex: host key
> algorithm: ecdsa-sha2-nistp256 debug1: kex: server->client cipher:
> chacha20-poly1305@openssh.com MAC: <implicit> compression: none
> debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC:
> <implicit> compression: none debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
> debug1: Server host key: ecdsa-sha2-nistp256
> SHA256:jI80AzLJamFx2iImMR5ArTzlGKtGCWE8Ydmt4Qyc8Zg debug1: Host
> '35.161.126.138' is known and matches the ECDSA host key. debug1:
> Found key in /var/root/.ssh/known_hosts:7 debug1: rekey after
> 134217728 blocks debug1: SSH2_MSG_NEWKEYS sent debug1: expecting
> SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: rekey after
> 134217728 blocks debug1: SSH2_MSG_EXT_INFO received debug1:
> kex_input_ext_info:
> server-sig-algs=<ssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521>
> debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that
> can continue: publickey debug1: Next authentication method: publickey
> debug1: Trying private key:
> /Users/waqas80/Documents/EnfocarSoft/awskeys/awsoregon.pem debug1:
> Authentications that can continue: publickey debug1: No more
> authentication methods to try. ubuntu@35.161.126.138: Permission
> denied (publickey).
New contributor
add a comment |Â
5 Answers
5
active
oldest
votes
5 Answers
5
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
40
down vote
accepted
debug1: key_load_public: No such file or directory
The line above is not error, but just simple debug log saying that ssh
client is not able to find separate public key (named ~/.ssh/id_rsa.pub
). This file is not needed to connect to the remote server, but it can be useful.
The actual error
ssh_exchange_identification: read: Connection reset by peer
points to error in server configuration. The server is running, but fails to accept the SSH connection. Check the server log for more information. Similar problems
That link was very helpful. And, it turns out that I was in fact blacklisted (I had ssh'ed into my server too many times while I was testing something out.)
â Eric
Nov 8 '16 at 22:47
1
My problem was a Bastion host had changed the IP address and theknown_hosts
was incorrect on my Mac... It showed@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
... It shows the line number by~/.ssh/known_hosts:238
. So, I removed that line, 238 in this case, from the known_hosts file on my Mac and I tried to connect again successfully.
â Marcello de Sales
Dec 14 '17 at 0:04
add a comment |Â
up vote
40
down vote
accepted
debug1: key_load_public: No such file or directory
The line above is not error, but just simple debug log saying that ssh
client is not able to find separate public key (named ~/.ssh/id_rsa.pub
). This file is not needed to connect to the remote server, but it can be useful.
The actual error
ssh_exchange_identification: read: Connection reset by peer
points to error in server configuration. The server is running, but fails to accept the SSH connection. Check the server log for more information. Similar problems
That link was very helpful. And, it turns out that I was in fact blacklisted (I had ssh'ed into my server too many times while I was testing something out.)
â Eric
Nov 8 '16 at 22:47
1
My problem was a Bastion host had changed the IP address and theknown_hosts
was incorrect on my Mac... It showed@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
... It shows the line number by~/.ssh/known_hosts:238
. So, I removed that line, 238 in this case, from the known_hosts file on my Mac and I tried to connect again successfully.
â Marcello de Sales
Dec 14 '17 at 0:04
add a comment |Â
up vote
40
down vote
accepted
up vote
40
down vote
accepted
debug1: key_load_public: No such file or directory
The line above is not error, but just simple debug log saying that ssh
client is not able to find separate public key (named ~/.ssh/id_rsa.pub
). This file is not needed to connect to the remote server, but it can be useful.
The actual error
ssh_exchange_identification: read: Connection reset by peer
points to error in server configuration. The server is running, but fails to accept the SSH connection. Check the server log for more information. Similar problems
debug1: key_load_public: No such file or directory
The line above is not error, but just simple debug log saying that ssh
client is not able to find separate public key (named ~/.ssh/id_rsa.pub
). This file is not needed to connect to the remote server, but it can be useful.
The actual error
ssh_exchange_identification: read: Connection reset by peer
points to error in server configuration. The server is running, but fails to accept the SSH connection. Check the server log for more information. Similar problems
edited Apr 13 '17 at 12:13
Communityâ¦
1
1
answered Nov 8 '16 at 22:28
Jakuje
16k52952
16k52952
That link was very helpful. And, it turns out that I was in fact blacklisted (I had ssh'ed into my server too many times while I was testing something out.)
â Eric
Nov 8 '16 at 22:47
1
My problem was a Bastion host had changed the IP address and theknown_hosts
was incorrect on my Mac... It showed@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
... It shows the line number by~/.ssh/known_hosts:238
. So, I removed that line, 238 in this case, from the known_hosts file on my Mac and I tried to connect again successfully.
â Marcello de Sales
Dec 14 '17 at 0:04
add a comment |Â
That link was very helpful. And, it turns out that I was in fact blacklisted (I had ssh'ed into my server too many times while I was testing something out.)
â Eric
Nov 8 '16 at 22:47
1
My problem was a Bastion host had changed the IP address and theknown_hosts
was incorrect on my Mac... It showed@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
... It shows the line number by~/.ssh/known_hosts:238
. So, I removed that line, 238 in this case, from the known_hosts file on my Mac and I tried to connect again successfully.
â Marcello de Sales
Dec 14 '17 at 0:04
That link was very helpful. And, it turns out that I was in fact blacklisted (I had ssh'ed into my server too many times while I was testing something out.)
â Eric
Nov 8 '16 at 22:47
That link was very helpful. And, it turns out that I was in fact blacklisted (I had ssh'ed into my server too many times while I was testing something out.)
â Eric
Nov 8 '16 at 22:47
1
1
My problem was a Bastion host had changed the IP address and the
known_hosts
was incorrect on my Mac... It showed @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
... It shows the line number by ~/.ssh/known_hosts:238
. So, I removed that line, 238 in this case, from the known_hosts file on my Mac and I tried to connect again successfully.â Marcello de Sales
Dec 14 '17 at 0:04
My problem was a Bastion host had changed the IP address and the
known_hosts
was incorrect on my Mac... It showed @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
... It shows the line number by ~/.ssh/known_hosts:238
. So, I removed that line, 238 in this case, from the known_hosts file on my Mac and I tried to connect again successfully.â Marcello de Sales
Dec 14 '17 at 0:04
add a comment |Â
up vote
0
down vote
Same problem, just post the solution here
Remove Your IP From /etc/hosts.deny
using :
nano /etc/hosts.deny
add a comment |Â
up vote
0
down vote
Same problem, just post the solution here
Remove Your IP From /etc/hosts.deny
using :
nano /etc/hosts.deny
add a comment |Â
up vote
0
down vote
up vote
0
down vote
Same problem, just post the solution here
Remove Your IP From /etc/hosts.deny
using :
nano /etc/hosts.deny
Same problem, just post the solution here
Remove Your IP From /etc/hosts.deny
using :
nano /etc/hosts.deny
edited Jul 26 '17 at 11:15
Archemar
19.2k93468
19.2k93468
answered Jul 26 '17 at 11:06
Qin Wang
1012
1012
add a comment |Â
add a comment |Â
up vote
0
down vote
Problem: bastion host IP mismatch on ~/.ssh/known_hosts
I had the known_hosts
file old as the IP address of the bastion changed...
$ ssh 10.82.49.24
ssh_exchange_identification: Connection closed by remote host
Did not give me any information. Looking at the verbose output leads to the same thing:
$ ssh -v 10.82.49.24
OpenSSH_7.4p1, LibreSSL 2.5.0
debug1: Reading configuration data /Users/mdesales/.ssh/config
debug1: /Users/mdesales/.ssh/config line 1: Applying options for 10.82.*.*
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Executing proxy command: exec ssh -q -W 10.82.49.24:22 ec2-user@bastion-vpc-xxxxxx.config-yyyyyyy.com -i ~/.ssh/xxxconfig-xxxx.pem
debug1: key_load_public: No such file or directory
debug1: identity file ~/.ssh/xxxconfig-xxxx.pem
debug1: key_load_public: No such file or directory
debug1: identity file ~/.ssh/xxxconfig-xxxx.pem-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.4
debug1: permanently_drop_suid: 1647059022
ssh_exchange_identification: Connection closed by remote host
At this point, since it is a proxy to another host through the bastion, I could see the bastion being a problem:
$ ssh ec2-user@bastion-vpc-xxxxxx.config-yyyyyyy.com -i ~/.ssh/xxxconfig-xxxx.pem
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
SHA256:Z8X1UlIgQ94BKJ7NA/oQi7v0NL4IlFeO7Ou4j76Zphk.
Please contact your system administrator.
Add correct host key in /Users/mdesales/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /Users/mdesales/.ssh/known_hosts:238
ECDSA host key for ec2-user@bastion-vpc-xxxxxx.config-yyyyyyy.com has changed and you have requested strict checking.
Host key verification failed.
Solution
Removing the entry on line 238 solved the problem... I could ssh to the bastion and I could ssh to the hosts.
$ vim /Users/mdesales/.ssh/known_hosts
$ ssh ec2-user@bastion-vpc-xxxxxx.config-yyyyyyy.com -i ~/.ssh/xxxconfig-xxxx.pem
The authenticity of host 'ec2-user@bastion-vpc-xxxxxx.config-yyyyyyy.com (34.x.x.y)' can't be established.
ECDSA key fingerprint is SHA256:Z8X1UlIgQ94BKJ7NA/oQi7v0NL4IlFeO7Ou4j76Zphk.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'ec2-user@bastion-vpc-xxxxxx.config-yyyyyyy.com -i ~/.ssh/xxxconfig-xxxx.pem,34.213.y.x' (ECDSA) to the list of known hosts.
********************************************************************************
This is a private computer system containing information that is proprietary
and confidential to the owner of the system. Only individuals or entities
authorized by the owner of the system are allowed to access or use the system.
Any unauthorized access or use of the system or information is strictly
prohibited.
All violators will be prosecuted to the fullest extent permitted by law.
********************************************************************************
Last login: Wed Aug 2 20:35:55 2017 from 10.81.31.115
[ec2-user@ip-10-82-50-142 ~]$
add a comment |Â
up vote
0
down vote
Problem: bastion host IP mismatch on ~/.ssh/known_hosts
I had the known_hosts
file old as the IP address of the bastion changed...
$ ssh 10.82.49.24
ssh_exchange_identification: Connection closed by remote host
Did not give me any information. Looking at the verbose output leads to the same thing:
$ ssh -v 10.82.49.24
OpenSSH_7.4p1, LibreSSL 2.5.0
debug1: Reading configuration data /Users/mdesales/.ssh/config
debug1: /Users/mdesales/.ssh/config line 1: Applying options for 10.82.*.*
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Executing proxy command: exec ssh -q -W 10.82.49.24:22 ec2-user@bastion-vpc-xxxxxx.config-yyyyyyy.com -i ~/.ssh/xxxconfig-xxxx.pem
debug1: key_load_public: No such file or directory
debug1: identity file ~/.ssh/xxxconfig-xxxx.pem
debug1: key_load_public: No such file or directory
debug1: identity file ~/.ssh/xxxconfig-xxxx.pem-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.4
debug1: permanently_drop_suid: 1647059022
ssh_exchange_identification: Connection closed by remote host
At this point, since it is a proxy to another host through the bastion, I could see the bastion being a problem:
$ ssh ec2-user@bastion-vpc-xxxxxx.config-yyyyyyy.com -i ~/.ssh/xxxconfig-xxxx.pem
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
SHA256:Z8X1UlIgQ94BKJ7NA/oQi7v0NL4IlFeO7Ou4j76Zphk.
Please contact your system administrator.
Add correct host key in /Users/mdesales/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /Users/mdesales/.ssh/known_hosts:238
ECDSA host key for ec2-user@bastion-vpc-xxxxxx.config-yyyyyyy.com has changed and you have requested strict checking.
Host key verification failed.
Solution
Removing the entry on line 238 solved the problem... I could ssh to the bastion and I could ssh to the hosts.
$ vim /Users/mdesales/.ssh/known_hosts
$ ssh ec2-user@bastion-vpc-xxxxxx.config-yyyyyyy.com -i ~/.ssh/xxxconfig-xxxx.pem
The authenticity of host 'ec2-user@bastion-vpc-xxxxxx.config-yyyyyyy.com (34.x.x.y)' can't be established.
ECDSA key fingerprint is SHA256:Z8X1UlIgQ94BKJ7NA/oQi7v0NL4IlFeO7Ou4j76Zphk.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'ec2-user@bastion-vpc-xxxxxx.config-yyyyyyy.com -i ~/.ssh/xxxconfig-xxxx.pem,34.213.y.x' (ECDSA) to the list of known hosts.
********************************************************************************
This is a private computer system containing information that is proprietary
and confidential to the owner of the system. Only individuals or entities
authorized by the owner of the system are allowed to access or use the system.
Any unauthorized access or use of the system or information is strictly
prohibited.
All violators will be prosecuted to the fullest extent permitted by law.
********************************************************************************
Last login: Wed Aug 2 20:35:55 2017 from 10.81.31.115
[ec2-user@ip-10-82-50-142 ~]$
add a comment |Â
up vote
0
down vote
up vote
0
down vote
Problem: bastion host IP mismatch on ~/.ssh/known_hosts
I had the known_hosts
file old as the IP address of the bastion changed...
$ ssh 10.82.49.24
ssh_exchange_identification: Connection closed by remote host
Did not give me any information. Looking at the verbose output leads to the same thing:
$ ssh -v 10.82.49.24
OpenSSH_7.4p1, LibreSSL 2.5.0
debug1: Reading configuration data /Users/mdesales/.ssh/config
debug1: /Users/mdesales/.ssh/config line 1: Applying options for 10.82.*.*
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Executing proxy command: exec ssh -q -W 10.82.49.24:22 ec2-user@bastion-vpc-xxxxxx.config-yyyyyyy.com -i ~/.ssh/xxxconfig-xxxx.pem
debug1: key_load_public: No such file or directory
debug1: identity file ~/.ssh/xxxconfig-xxxx.pem
debug1: key_load_public: No such file or directory
debug1: identity file ~/.ssh/xxxconfig-xxxx.pem-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.4
debug1: permanently_drop_suid: 1647059022
ssh_exchange_identification: Connection closed by remote host
At this point, since it is a proxy to another host through the bastion, I could see the bastion being a problem:
$ ssh ec2-user@bastion-vpc-xxxxxx.config-yyyyyyy.com -i ~/.ssh/xxxconfig-xxxx.pem
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
SHA256:Z8X1UlIgQ94BKJ7NA/oQi7v0NL4IlFeO7Ou4j76Zphk.
Please contact your system administrator.
Add correct host key in /Users/mdesales/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /Users/mdesales/.ssh/known_hosts:238
ECDSA host key for ec2-user@bastion-vpc-xxxxxx.config-yyyyyyy.com has changed and you have requested strict checking.
Host key verification failed.
Solution
Removing the entry on line 238 solved the problem... I could ssh to the bastion and I could ssh to the hosts.
$ vim /Users/mdesales/.ssh/known_hosts
$ ssh ec2-user@bastion-vpc-xxxxxx.config-yyyyyyy.com -i ~/.ssh/xxxconfig-xxxx.pem
The authenticity of host 'ec2-user@bastion-vpc-xxxxxx.config-yyyyyyy.com (34.x.x.y)' can't be established.
ECDSA key fingerprint is SHA256:Z8X1UlIgQ94BKJ7NA/oQi7v0NL4IlFeO7Ou4j76Zphk.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'ec2-user@bastion-vpc-xxxxxx.config-yyyyyyy.com -i ~/.ssh/xxxconfig-xxxx.pem,34.213.y.x' (ECDSA) to the list of known hosts.
********************************************************************************
This is a private computer system containing information that is proprietary
and confidential to the owner of the system. Only individuals or entities
authorized by the owner of the system are allowed to access or use the system.
Any unauthorized access or use of the system or information is strictly
prohibited.
All violators will be prosecuted to the fullest extent permitted by law.
********************************************************************************
Last login: Wed Aug 2 20:35:55 2017 from 10.81.31.115
[ec2-user@ip-10-82-50-142 ~]$
Problem: bastion host IP mismatch on ~/.ssh/known_hosts
I had the known_hosts
file old as the IP address of the bastion changed...
$ ssh 10.82.49.24
ssh_exchange_identification: Connection closed by remote host
Did not give me any information. Looking at the verbose output leads to the same thing:
$ ssh -v 10.82.49.24
OpenSSH_7.4p1, LibreSSL 2.5.0
debug1: Reading configuration data /Users/mdesales/.ssh/config
debug1: /Users/mdesales/.ssh/config line 1: Applying options for 10.82.*.*
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Executing proxy command: exec ssh -q -W 10.82.49.24:22 ec2-user@bastion-vpc-xxxxxx.config-yyyyyyy.com -i ~/.ssh/xxxconfig-xxxx.pem
debug1: key_load_public: No such file or directory
debug1: identity file ~/.ssh/xxxconfig-xxxx.pem
debug1: key_load_public: No such file or directory
debug1: identity file ~/.ssh/xxxconfig-xxxx.pem-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.4
debug1: permanently_drop_suid: 1647059022
ssh_exchange_identification: Connection closed by remote host
At this point, since it is a proxy to another host through the bastion, I could see the bastion being a problem:
$ ssh ec2-user@bastion-vpc-xxxxxx.config-yyyyyyy.com -i ~/.ssh/xxxconfig-xxxx.pem
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
SHA256:Z8X1UlIgQ94BKJ7NA/oQi7v0NL4IlFeO7Ou4j76Zphk.
Please contact your system administrator.
Add correct host key in /Users/mdesales/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /Users/mdesales/.ssh/known_hosts:238
ECDSA host key for ec2-user@bastion-vpc-xxxxxx.config-yyyyyyy.com has changed and you have requested strict checking.
Host key verification failed.
Solution
Removing the entry on line 238 solved the problem... I could ssh to the bastion and I could ssh to the hosts.
$ vim /Users/mdesales/.ssh/known_hosts
$ ssh ec2-user@bastion-vpc-xxxxxx.config-yyyyyyy.com -i ~/.ssh/xxxconfig-xxxx.pem
The authenticity of host 'ec2-user@bastion-vpc-xxxxxx.config-yyyyyyy.com (34.x.x.y)' can't be established.
ECDSA key fingerprint is SHA256:Z8X1UlIgQ94BKJ7NA/oQi7v0NL4IlFeO7Ou4j76Zphk.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'ec2-user@bastion-vpc-xxxxxx.config-yyyyyyy.com -i ~/.ssh/xxxconfig-xxxx.pem,34.213.y.x' (ECDSA) to the list of known hosts.
********************************************************************************
This is a private computer system containing information that is proprietary
and confidential to the owner of the system. Only individuals or entities
authorized by the owner of the system are allowed to access or use the system.
Any unauthorized access or use of the system or information is strictly
prohibited.
All violators will be prosecuted to the fullest extent permitted by law.
********************************************************************************
Last login: Wed Aug 2 20:35:55 2017 from 10.81.31.115
[ec2-user@ip-10-82-50-142 ~]$
answered Dec 14 '17 at 0:12
Marcello de Sales
13816
13816
add a comment |Â
add a comment |Â
up vote
0
down vote
Happened to me today.
Fixed by disconnecting my WLAN and reconnecting. Yes, it sounds stupid and it is stupid but at least on one WLAN this has happened with no any good reason.
add a comment |Â
up vote
0
down vote
Happened to me today.
Fixed by disconnecting my WLAN and reconnecting. Yes, it sounds stupid and it is stupid but at least on one WLAN this has happened with no any good reason.
add a comment |Â
up vote
0
down vote
up vote
0
down vote
Happened to me today.
Fixed by disconnecting my WLAN and reconnecting. Yes, it sounds stupid and it is stupid but at least on one WLAN this has happened with no any good reason.
Happened to me today.
Fixed by disconnecting my WLAN and reconnecting. Yes, it sounds stupid and it is stupid but at least on one WLAN this has happened with no any good reason.
answered Dec 29 '17 at 12:14
Stargazers
1
1
add a comment |Â
add a comment |Â
up vote
0
down vote
I am having the same issue. Can anyone help.
Below is the complete detail, I gave permission on the file using $chmod 600
> OpenSSH_7.7p1, LibreSSL 2.7.3 debug1: Reading configuration data
> /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 48: Applying
> options for * debug1: Connecting to 35.161.126.138 [35.161.126.138]
> port 22. debug1: Connection established. debug1: permanently_set_uid:
> 0/0 debug1: key_load_public: No such file or directory debug1:
> identity file
> /Users/waqas80/Documents/EnfocarSoft/awskeys/awsoregon.pem type -1
> debug1: key_load_public: No such file or directory debug1: identity
> file /Users/waqas80/Documents/EnfocarSoft/awskeys/awsoregon.pem-cert
> type -1 debug1: Local version string SSH-2.0-OpenSSH_7.7 debug1:
> Remote protocol version 2.0, remote software version OpenSSH_7.6p1
> Ubuntu-4 debug1: match: OpenSSH_7.6p1 Ubuntu-4 pat OpenSSH* compat
> 0x04000000 debug1: Authenticating to 35.161.126.138:22 as 'ubuntu'
> debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received
> debug1: kex: algorithm: curve25519-sha256 debug1: kex: host key
> algorithm: ecdsa-sha2-nistp256 debug1: kex: server->client cipher:
> chacha20-poly1305@openssh.com MAC: <implicit> compression: none
> debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC:
> <implicit> compression: none debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
> debug1: Server host key: ecdsa-sha2-nistp256
> SHA256:jI80AzLJamFx2iImMR5ArTzlGKtGCWE8Ydmt4Qyc8Zg debug1: Host
> '35.161.126.138' is known and matches the ECDSA host key. debug1:
> Found key in /var/root/.ssh/known_hosts:7 debug1: rekey after
> 134217728 blocks debug1: SSH2_MSG_NEWKEYS sent debug1: expecting
> SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: rekey after
> 134217728 blocks debug1: SSH2_MSG_EXT_INFO received debug1:
> kex_input_ext_info:
> server-sig-algs=<ssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521>
> debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that
> can continue: publickey debug1: Next authentication method: publickey
> debug1: Trying private key:
> /Users/waqas80/Documents/EnfocarSoft/awskeys/awsoregon.pem debug1:
> Authentications that can continue: publickey debug1: No more
> authentication methods to try. ubuntu@35.161.126.138: Permission
> denied (publickey).
New contributor
add a comment |Â
up vote
0
down vote
I am having the same issue. Can anyone help.
Below is the complete detail, I gave permission on the file using $chmod 600
> OpenSSH_7.7p1, LibreSSL 2.7.3 debug1: Reading configuration data
> /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 48: Applying
> options for * debug1: Connecting to 35.161.126.138 [35.161.126.138]
> port 22. debug1: Connection established. debug1: permanently_set_uid:
> 0/0 debug1: key_load_public: No such file or directory debug1:
> identity file
> /Users/waqas80/Documents/EnfocarSoft/awskeys/awsoregon.pem type -1
> debug1: key_load_public: No such file or directory debug1: identity
> file /Users/waqas80/Documents/EnfocarSoft/awskeys/awsoregon.pem-cert
> type -1 debug1: Local version string SSH-2.0-OpenSSH_7.7 debug1:
> Remote protocol version 2.0, remote software version OpenSSH_7.6p1
> Ubuntu-4 debug1: match: OpenSSH_7.6p1 Ubuntu-4 pat OpenSSH* compat
> 0x04000000 debug1: Authenticating to 35.161.126.138:22 as 'ubuntu'
> debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received
> debug1: kex: algorithm: curve25519-sha256 debug1: kex: host key
> algorithm: ecdsa-sha2-nistp256 debug1: kex: server->client cipher:
> chacha20-poly1305@openssh.com MAC: <implicit> compression: none
> debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC:
> <implicit> compression: none debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
> debug1: Server host key: ecdsa-sha2-nistp256
> SHA256:jI80AzLJamFx2iImMR5ArTzlGKtGCWE8Ydmt4Qyc8Zg debug1: Host
> '35.161.126.138' is known and matches the ECDSA host key. debug1:
> Found key in /var/root/.ssh/known_hosts:7 debug1: rekey after
> 134217728 blocks debug1: SSH2_MSG_NEWKEYS sent debug1: expecting
> SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: rekey after
> 134217728 blocks debug1: SSH2_MSG_EXT_INFO received debug1:
> kex_input_ext_info:
> server-sig-algs=<ssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521>
> debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that
> can continue: publickey debug1: Next authentication method: publickey
> debug1: Trying private key:
> /Users/waqas80/Documents/EnfocarSoft/awskeys/awsoregon.pem debug1:
> Authentications that can continue: publickey debug1: No more
> authentication methods to try. ubuntu@35.161.126.138: Permission
> denied (publickey).
New contributor
add a comment |Â
up vote
0
down vote
up vote
0
down vote
I am having the same issue. Can anyone help.
Below is the complete detail, I gave permission on the file using $chmod 600
> OpenSSH_7.7p1, LibreSSL 2.7.3 debug1: Reading configuration data
> /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 48: Applying
> options for * debug1: Connecting to 35.161.126.138 [35.161.126.138]
> port 22. debug1: Connection established. debug1: permanently_set_uid:
> 0/0 debug1: key_load_public: No such file or directory debug1:
> identity file
> /Users/waqas80/Documents/EnfocarSoft/awskeys/awsoregon.pem type -1
> debug1: key_load_public: No such file or directory debug1: identity
> file /Users/waqas80/Documents/EnfocarSoft/awskeys/awsoregon.pem-cert
> type -1 debug1: Local version string SSH-2.0-OpenSSH_7.7 debug1:
> Remote protocol version 2.0, remote software version OpenSSH_7.6p1
> Ubuntu-4 debug1: match: OpenSSH_7.6p1 Ubuntu-4 pat OpenSSH* compat
> 0x04000000 debug1: Authenticating to 35.161.126.138:22 as 'ubuntu'
> debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received
> debug1: kex: algorithm: curve25519-sha256 debug1: kex: host key
> algorithm: ecdsa-sha2-nistp256 debug1: kex: server->client cipher:
> chacha20-poly1305@openssh.com MAC: <implicit> compression: none
> debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC:
> <implicit> compression: none debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
> debug1: Server host key: ecdsa-sha2-nistp256
> SHA256:jI80AzLJamFx2iImMR5ArTzlGKtGCWE8Ydmt4Qyc8Zg debug1: Host
> '35.161.126.138' is known and matches the ECDSA host key. debug1:
> Found key in /var/root/.ssh/known_hosts:7 debug1: rekey after
> 134217728 blocks debug1: SSH2_MSG_NEWKEYS sent debug1: expecting
> SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: rekey after
> 134217728 blocks debug1: SSH2_MSG_EXT_INFO received debug1:
> kex_input_ext_info:
> server-sig-algs=<ssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521>
> debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that
> can continue: publickey debug1: Next authentication method: publickey
> debug1: Trying private key:
> /Users/waqas80/Documents/EnfocarSoft/awskeys/awsoregon.pem debug1:
> Authentications that can continue: publickey debug1: No more
> authentication methods to try. ubuntu@35.161.126.138: Permission
> denied (publickey).
New contributor
I am having the same issue. Can anyone help.
Below is the complete detail, I gave permission on the file using $chmod 600
> OpenSSH_7.7p1, LibreSSL 2.7.3 debug1: Reading configuration data
> /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 48: Applying
> options for * debug1: Connecting to 35.161.126.138 [35.161.126.138]
> port 22. debug1: Connection established. debug1: permanently_set_uid:
> 0/0 debug1: key_load_public: No such file or directory debug1:
> identity file
> /Users/waqas80/Documents/EnfocarSoft/awskeys/awsoregon.pem type -1
> debug1: key_load_public: No such file or directory debug1: identity
> file /Users/waqas80/Documents/EnfocarSoft/awskeys/awsoregon.pem-cert
> type -1 debug1: Local version string SSH-2.0-OpenSSH_7.7 debug1:
> Remote protocol version 2.0, remote software version OpenSSH_7.6p1
> Ubuntu-4 debug1: match: OpenSSH_7.6p1 Ubuntu-4 pat OpenSSH* compat
> 0x04000000 debug1: Authenticating to 35.161.126.138:22 as 'ubuntu'
> debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received
> debug1: kex: algorithm: curve25519-sha256 debug1: kex: host key
> algorithm: ecdsa-sha2-nistp256 debug1: kex: server->client cipher:
> chacha20-poly1305@openssh.com MAC: <implicit> compression: none
> debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC:
> <implicit> compression: none debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
> debug1: Server host key: ecdsa-sha2-nistp256
> SHA256:jI80AzLJamFx2iImMR5ArTzlGKtGCWE8Ydmt4Qyc8Zg debug1: Host
> '35.161.126.138' is known and matches the ECDSA host key. debug1:
> Found key in /var/root/.ssh/known_hosts:7 debug1: rekey after
> 134217728 blocks debug1: SSH2_MSG_NEWKEYS sent debug1: expecting
> SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: rekey after
> 134217728 blocks debug1: SSH2_MSG_EXT_INFO received debug1:
> kex_input_ext_info:
> server-sig-algs=<ssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521>
> debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that
> can continue: publickey debug1: Next authentication method: publickey
> debug1: Trying private key:
> /Users/waqas80/Documents/EnfocarSoft/awskeys/awsoregon.pem debug1:
> Authentications that can continue: publickey debug1: No more
> authentication methods to try. ubuntu@35.161.126.138: Permission
> denied (publickey).
New contributor
New contributor
answered 14 mins ago
Waqas
1
1
New contributor
New contributor
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f321968%2ftrying-to-ssh-into-server-and-getting-key-load-public-no-such-file-or-directory%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Is there an actual problem? For example, are you actually failing to log in? Could you edit your question to include the complete debug output, instead of just the first part?
â Kenster
Nov 8 '16 at 22:18
Yes; my apologies! I can't log in -- and I had left off the last (and perhaps most important?) line earlier.
â Eric
Nov 8 '16 at 22:28