美文网首页
2019-09-29 Xshell初次连接Ubuntu时失败的解

2019-09-29 Xshell初次连接Ubuntu时失败的解

作者: 柒李香 | 来源:发表于2019-09-29 08:24 被阅读0次

基于VirtualBox

1、ifconfig查看Ubuntu的ip时显示10.0.2.1

  • ifconfig安装
apt-get install ifconfig
  • 打开 控制>设置>网络,将连接方式改为桥接网卡
其他默认(混杂模式可以改为拒绝)
此时查看ip就会显示192.168.43.xxx

2、连接root用户时显示拒绝了您的密码

  • 关闭防火墙
ufw disable  
  • 开启22端口
ufw allow 22
  • 安装ssh服务
apt-get install openssh-server

以上三步的原文链接
https://blog.csdn.net/qq_33722172/article/details/86591275

  • 更改配置文件
 vi /etc/ssh/sshd_config
将PermitRootLogin prohibit-password改为PermitRootLogin yes

不要忘记去掉PermitRootLogin属性前面的#,此属性为默认配置

  • 重启ssh服务
service ssh restart

相关文章

网友评论

      本文标题:2019-09-29 Xshell初次连接Ubuntu时失败的解

      本文链接:https://www.haomeiwen.com/subject/vclqyctx.html