我在一家公司。
linux机器的IP是192.168.8.183,
我的Windows机器的IP是172.16.22.53。
linux机器和Windows mashine是真正的机器,而不是VM虚拟机。
首先我安装了cygwin。
然后我为我的Windows机器安装了copssh和openssh-server。但是在尝试了很多之后,我卸载了copssh和openssh-server。
现在只有cygwin存在!
之后重启我的Windows机器。然后我使用putty im my windows machine登录linux机器,然后使用$ ssh sikaiwei@172.16.22.53,但出现了一些错误:
[sikaiwei@login-0-11 ~]$ ssh sikaiwei@172.16.22.53
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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 the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
61:aa:6a:0d:85:da:bc:82:64:42:b6:56:3f:27:02:2b.
Please contact your system administrator.
Add correct host key in /home/sikaiwei/.ssh/known_hosts to get rid of this message.
Offending key in /home/sikaiwei/.ssh/known_hosts:2
Password authentication is disabled to avoid man-in-the-middle attacks.
Keyboard-interactive authentication is disabled to avoid man-in-the-middle attacks.
Agent forwarding is disabled to avoid man-in-the-middle attacks.
X11 forwarding is disabled to avoid man-in-the-middle attacks.
Permission denied (publickey,password,keyboard-interactive).
[sikaiwei@login-0-11 ~]$
我发现这个:
Add correct host key in /home/sikaiwei/.ssh/known_hosts to get rid of this message.
所以我去/home/sikaiwei/.ssh/known_hosts:
[sikaiwei@login-0-11 .ssh]$ vi known_hosts
192.168.8.183 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAr0OPxQ49Nvl9JxvUEKsFa0LraupPW
i3zShoBCiSNSgaiQZNA/7v6YCYovVV+Fyd1+AoIuAVN+17jiuiLc9Upxkqu3
/BQnEZB1quDUFPLnNYXguentNmGDLeovrrzHCY8nfUNstxNOm
/fGosu1kwmQT7MyWB2j2dhjgkf8k0NOsrZkBOoz4zwoLhvAs
/N8zhiI+DKiJ3b6SSxPfr582FM2uEnsXB6jql4B2AONICxmPfU1nBhsSx0IaX+esOGDD9
Rfk03QPqPAgmDapqGbz6EhnUY3cIXt5JEpznkogM6gZoTNLB+fX878YHqRRkqzBUD
4xhp5dlAQ+h5nCscK5GcFw==
172.16.22.53 ssh-rsa
AAAAB3NzaC1yc2EAAAADAQABAAAAgQDQxnLSG/xVy6jSMd2cyv+5G2pR8MrKOnlqJv+ppfl5Nb1CfKgrK8c
Q2BnlFuSJTnVWsBtc89812tGmLsaE2NaFVxDStAW0JoqO5W9IShT0hCRvcn9sAu3yS
ZQYYXZgJIG0dSR2YBUyNv+tqRQWSbWswGUKjVqOlRPQ/M6DTsLFCw==
我删除了第2行,但随后:
[sikaiwei@login-0-11 .ssh]$ ssh sikaiwei@172.16.22.53
Warning: Permanently added '172.16.22.53' (RSA) to the list of known hosts.
sikaiwei@172.16.22.53's password:
Permission denied, please try again.
sikaiwei@172.16.22.53's password:
Permission denied, please try again.
sikaiwei@172.16.22.53's password:
Permission denied (publickey,password,keyboard-interactive).