╭─root at kali in ~/.ssh using
╰─○ ssh -p8022 u0_a167@192.168.0.5

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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:N6+lyMdF959m1PjYuEu7Iy1CyPMVl9QL8YHTWUGSPl4.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /root/.ssh/known_hosts:4
remove with:
ssh-keygen -f "/root/.ssh/known_hosts" -R "[192.168.0.5]:8022"
ECDSA host key for [192.168.0.5]:8022 has changed and you have requested strict checking.
Host key verification failed.

我链接不上我的虚拟机了。

然后我把known_hosts内容清空了。发现变成了。

╭─root at kali in ~/.ssh using
╰─○ ssh -p8022 u0_a167@192.168.0.5
The authenticity of host '[192.168.0.5]:8022 ([192.168.0.5]:8022)' can't be established.
ECDSA key fingerprint is SHA256:N6+lyMdF959m1PjYuEu7Iy1CyPMVl9QL8YHTWUGSPl4.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '[192.168.0.5]:8022' (ECDSA) to the list of known hosts.
sign_and_send_pubkey: signing failed: agent refused operation
u0_a167@192.168.0.5: Permission denied (publickey,keyboard-interactive).

然后我把known_hosts删掉了。

然后我把.ssh目录下的那三个文件全部删掉了

id_rsa   id_rsa.pub   known_hosts全删掉了重新生成

╭─root at kali in ~/.ssh using
╰─○ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:EuATq/1ABMzZJ1ixJeL0iiIs2z8m08Hg9CTZ6wh4BkU root@kali
The key's randomart image is:
+---[RSA 2048]----+
| +E*B.. |
| o*=oB. |
| ..oBo. |
|o.==o. . |
|*=o*o.. S |
|*o+ =o . |
|.+.+ .. |
| +.= |
| +.. |
+----[SHA256]-----+

然后在目标虚拟机上的.ssh文件夹里也把id_rsa   id_rsa.pub   known_hosts这三个文件删掉。

然后把刚刚生成的id_rsa和id_rsa.pub复制到目标虚拟机的.ssh文件夹里

然后在目标的虚拟机上重新执行

$ cat id_rsa.pub > authorized_keys

依然没有解决。。

然后重启了一下我的kali。。

╭─root at kali in ~ using
╰─○ ssh -p8022 u0_a167@192.168.0.5
warning: agent returned different signature type ssh-rsa (expected rsa-sha2-512)
Welcome to Termux!

Wiki: https://wiki.termux.com
Community forum: https://termux.com/community
IRC channel: #termux on freenode
Gitter chat: https://gitter.im/termux/termux
Mailing list: termux+subscribe@groups.io

Search packages: pkg search <query>
Install a package: pkg install <package>
Upgrade packages: pkg upgrade
Learn more: pkg help
$

搞定了。

 

0

正因为生来什么都没有,因此我们能拥有一切。