1. CentOS-8中 在安装软件时,出现此报错
Failed to download metadata for repo ‘AppStream‘: Cannot download repomd.xml”
解决方法:
1.打开/etc/yum.repos.d文件夹:
cd /etc/yum.repos.d
2.新建bak文件夹并将文件拷贝进其中:
mkdir bak
cp * bak/
会出现cp: -r not specified; omitting directory 'bak’提示,无视掉就可
3.使用以下命令进行内容的替换:
sed -i 's/$releasever/8-stream/' CentOS*repo
ok 大功告成
2.ssh连接服务器时,出现以下报错
[root@localhost ~]# ssh xxx.xxx.x.xxx
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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
7e:68:8c:e5:09:9f:0d:5f:a4:47:07:a5:69:24:9a:bf.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending key in /root/.ssh/known_hosts:33
RSA host key for xxx.xxx.x.xxx has changed and you have requested strict checking.
Host key verification failed.
这一般是重置服务器后出现的报错,windows上的解决方式为:
打开 C:\Users\xxx.ssh(这里的xxx是你的用户名)文件夹
找到
此文件,用记事本打开后,找到你重置过的服务器ip或者域名那一行,删掉即可。
3.在更改域名的解析IP后,ping此域名,还是显示之前的ip
这个是本地DNS缓存的问题,正常来说,过个几小时就好了,但是如果急用,
可以打开cmd,输入ipconfig /flushdns 来刷新dns即可