kali源
apt源:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | #中科大 deb http: //mirrors .ustc.edu.cn /kali kali-rolling main non- free contrib deb-src http: //mirrors .ustc.edu.cn /kali kali-rolling main non- free contrib #阿里云 deb http: //mirrors .aliyun.com /kali kali-rolling main non- free contrib deb-src http: //mirrors .aliyun.com /kali kali-rolling main non- free contrib #清华大学 deb http: //mirrors .tuna.tsinghua.edu.cn /kali kali-rolling main contrib non- free deb-src https: //mirrors .tuna.tsinghua.edu.cn /kali kali-rolling main contrib non- free #浙大 deb http: //mirrors .zju.edu.cn /kali kali-rolling main contrib non- free deb-src http: //mirrors .zju.edu.cn /kali kali-rolling main contrib non- free #东软大学 deb http: //mirrors .neusoft.edu.cn /kali kali-rolling /main non- free contrib deb-src http: //mirrors .neusoft.edu.cn /kali kali-rolling /main non- free contrib #官方源 deb http: //http .kali.org /kali kali-rolling main non- free contrib deb-src http: //http .kali.org /kali kali-rolling main non- free contrib |
故障解决:
故障现象:
1 2 | [root@host01 ~] # ssh 10.105.139.144 no hostkey alg |
查看详细信息:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | [root@host01 ssh ] # ssh -v 10.105.139.144 OpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013 debug1: Reading configuration data /etc/ssh/ssh_config debug1: Applying options for * debug1: Connecting to 10.105.139.144 [10.105.139.144] port 22. debug1: Connection established. debug1: permanently_set_uid: 0 /0 debug1: identity file /root/ . ssh /identity type -1 debug1: identity file /root/ . ssh /identity-cert type -1 debug1: identity file /root/ . ssh /id_rsa type 1 debug1: identity file /root/ . ssh /id_rsa-cert type -1 debug1: identity file /root/ . ssh /id_dsa type -1 debug1: identity file /root/ . ssh /id_dsa-cert type -1 debug1: identity file /root/ . ssh /id_ecdsa type -1 debug1: identity file /root/ . ssh /id_ecdsa-cert type -1 debug1: Remote protocol version 2.0, remote software version OpenSSH_7.8p1 Debian-1 debug1: match: OpenSSH_7.8p1 Debian-1 pat OpenSSH* debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_5.3 debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: server->client aes128-ctr hmac-sha1 none debug1: kex: client->server aes128-ctr hmac-sha1 none no hostkey alg |
解决方法:
在服务端执行以下命令:
1 2 | ssh -keygen -t rsa -f /etc/ssh/ssh_host_rsa_key ssh -keygen -t dsa -f /etc/ssh/ssh_host_dsa_key |
There are services installed on your system which need to be restarted when certain libraries, such as libpam, libc, x
and libssl, are upgraded. Since these restarts may cause interruptions of service for the system, you will normally be x
prompted on each upgrade for the list of services you wish to restart. You can choose this option to avoid being x
prompted; instead, all necessary restarts will be done for you automatically so you can avoid being asked questions on x
each library upgrade. x
Restart services during package upgrades without asking?
kali关闭iptables
安装
apt-get install ufw
关闭
ufw disable # To disable the firewall
开启
ufw enable # To enable the firewall
下面简单讲一下这个问题的原理和比较长久的解决方案。
1、ssh会把你每个你访问过计算机的公钥(public key)都记录在~/.ssh/known_hosts。当下次访问相同计算机时,OpenSSH会核对公钥。如果公钥不同,OpenSSH会发出警告, 避免你受到DNS Hijack之类的攻击。
2、SSH对主机的public_key的检查等级是根据StrictHostKeyChecking变量来配置的。默认情况下,
StrictHostKeyChecking=ask。
1 2 3 4 | 1.StrictHostKeyChecking=no #最不安全的级别。如果连接server的key在本地不存在,那么就自动添加到文件中(默认是known_hosts),并且给出一个警告。 2.StrictHostKeyChecking=ask #默认的级别,就是出现刚才的提示了。如果连接和key不匹配,给出提示,并拒绝登录。 3.StrictHostKeyChecking= yes #最安全的级别,如果连接与key不匹配,就拒绝连接,不会提示详细信息。 |
ask状态:
vim /etc/ssh/ssh_config
StrictHostKeyChecking no UserKnownHostsFile /dev/null
(注:这里为了简便,将knownhostfile设为/dev/null,就不保存在known_hosts中了)
SSH 登录失败:Host key verification failed 的处理方法
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· AI与.NET技术实操系列:基于图像分类模型对图像进行分类
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 25岁的心里话
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· ollama系列01:轻松3步本地部署deepseek,普通电脑可用
· 按钮权限的设计及实现