一、Xshell首次链接kali系统中的ssh
Xshell:帮助我们去连接各种服务平台,方便管理服务器,链路可以加密处理(ssh/vsftp)
1.开启kali中的ssh服务,service ssh start,检测是否开启成功查看状态
/etc/init.d/ssh status 或 netstat -ntulp | 22
2.关闭防火墙(目前) /etc/init.d/iptables stop,然后需要找到ssh的配置文件vi /etc/ssh/sshd_config,修改sshd_config文件,命令为:
vi /etc/ssh/sshd_config
将#PasswordAuthentication no的注释去掉,并且将NO修改为YES //kali中默认是yes
3. 将PermitRootLogin without-password修改为
PermitRootLogin yes
4.重启服务 service ssh restart
若重启失败,则输入/usr/sbin/sshd -T,执行命令找到错误的地方进行修改
设置开机自动启动命令是:update-rc.d ssh enable
检测是否开启成功 service ssh status
5.使用Xshell链接,使用root账号或普通账号,打开xshell-->文件-->新建-->协议选择ssh-->主机输入kali的IP地址,用ifconfig查看,端口默认为22,点击链接,接下来输入root账号,最后输入密码,即可链接
注:ssh服务可以更改端口,修改配置文件,port --> port 2222
更新源:更新源是为了能安装软件
1.打开sources.list文件
命令:leafpad /etc/apt/sources.list
2.添加以下更新源:
#中科大
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
deb http://mirrors.163.com/debian/ jessie main non-free contrib
deb http://mirrors.163.com/debian/ jessie-updates main non-free contrib
deb http://mirrors.163.com/debian/ jessie-backports main non-free contrib
deb-src http://mirrors.163.com/debian/ jessie main non-free contrib
deb-src http://mirrors.163.com/debian/ jessie-updates main non-free contrib
deb-src http://mirrors.163.com/debian/ jessie-backports main non-free contrib
deb http://mirrors.163.com/debian-security/ jessie/updates main non-free contrib
deb-src http://mirrors.163.com/debian-security/ jessie/updates main non-free contrib
3.保存后执行
apt-get update #取回更新的软件包列表信息
apt-get upgrade #进行一次升级
apt-get clean #删除已经下载的安装包
reboot #重启
原文地址:https://www.cnblogs.com/liujizhou/p/11525116.html