Xshell 首次连接 kali 系统中的 SSH
Xshell 帮助我们去连接各种服务平台 方便 管理服务器 链路是加密处理 (SSH/vsftp)
Step 1: 开启 kali 中的 SSH 服务 检测是否开启成功 /etc/init.d/SSH status 或者 netstat -ntulp|grep 22
发现是关闭的 修改 sshd_config 文件, 命令为:
vi /etc/SSH/sshd_config
将 #PasswordAuthentication no 的注释去掉, 并且将 NO 修改为 YES //kali 中默认是 yes
将 PermitRootLogin without-password 修改为
PermitRootLogin yes
然后, 保存, 退出 VIM 启动 SSH 服务
命令为:
/etc/init.d/SSH start
再次查看 SSH 服务是否开启
Step 2: 关闭防火墙 (目前)/etc/init.d/iptables stop, 然后需要找到 SSH 的配置文件
/etc/SSH/sshd_config 大约在 27 行 将 "#PermiaRootLogin prohibit-password" 修改为
"PremitRootLogin yes" 保存退出
Step 3:service SSH restart /etc/init.d/SSH restart 使用 xshell 连接 使用 root 账号或普通账号
update -re.d SSH enable 设置开机启用
Step 4: xshell: 文件 - 新建 - 协议选择 SSH, 主机输入 kali 的 ip, 端口默认是 22 然后点击连接 , 接下来输入 root 账号 最后输入密码
注意; SSH 服务可以更改端口, 修改配置文件, port 22-port 2222
连接完成
来源: http://www.bubuko.com/infodetail-3210732.html