Project scenario:
Under Linux Ubuntu system, use SCP command to transfer files from another server to this server.
Problem description
tips: describe the problems encountered in the project here:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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:'A string of characters'.
Please contact your system administrator.
Add correct host key in /home/tonnn/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /home/tonnn/.ssh/known_hosts:12
ECDSA host key for 'External Server IP' has changed and you have requested strict checking.
Host key verification failed.
Cause analysis:
Tip: fill in the problem analysis here:
I found out after Google that the ECDSA key of the cloud server was changed because I reinstalled my Aliyun server system, and the ECDSA key left in /home/tonnn/.ssh/known_hosts on the target server was still the original ECDSA key, resulting in failed Host key verification.
Solution:
Clear the ECDSA key corresponding to the IP address in the target server /home/tonnn/.ssh/known_hosts, and then add a new one.
Use the ssh-keygen -R ip-address command, and go to the official website https://www.ssh.com/academy/ssh/keygen#command-and-option-summary to check out how-to-use, which means that the known_hosts file belongs to a host all the keys of the hostname are cleared.
After clearing, reconnect the corresponding host, and the server will record the new ecdsa key
.
Read More:
- [Solved] Linux scp Error: Host key verification failed.
- [Solved] SSH Error: ECDSA host key for xxx has changed and you have requested strict checking.
- [Solved] Sshpass Error: Host key verification failed
- [Solved] SSH Startup Error: unable to load host key /etc/ssh/ssh_host_ed25519_key bad permissions
- [Solved] linux kernel load driver Error: module verification failed: signature and/or required key missing – tainting kernel
- [Solved] SSH connect error: Host key validation failed
- [Solved] secureCRT Failed to Login Ubuntu20.04 Error: Key exchange failed
- [Solved] Clone Linux Code Error: server certificate verification failed. CAfile: none CRLfile: none
- Enter passphrase for key ‘/c/Users/**/.ssh/id_rsa‘ [How to Solve]
- [Solved] ERROR: The kernel module failed to load, because it was not signed by a key that is trusted by the
- [Solved] svn: OPTIONS of ‘https://xxx/svn/xxx’: SSL handshake failed: SSL error: Key usage violation in certificate has been detected.
- Linux Error: Failed to connect to ::1: No route to the host
- The problem of inconsistent host names in building rabbitmq on Linux
- [Solved] Flask Error: RuntimeError: The session is unavailable because no secret key was set.
- [Solved] Module yaml error: Unexpected key in data: static_context
- linux yum Error: PYCURL ERROR 6 – “Couldn’t resolve host ‘mirrorlist.centos.org’”
- The JSON variable is parsed in the shell to obtain the value corresponding to the key
- [Solved] SSH WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!
- Nginx Error: SSL: error:140AB18F:SSL routines:SSL_CTX_use_certificate:ee key too small
- Ubuntu 20.04 Desktop Install sublime-text Error: “Certificate verification failed”