虚拟机网络设置为桥接模式,并能与本机互通和上网

1. 更新源列表

打开"终端窗口",输入"sudo apt-get update"

2. 安装openssh-server

在终端中输入: sudo apt-get install openssh-server

3. 查看查看ssh服务是否启动

打开"终端窗口",输入"sudo ps -e |grep ssh"

没有的话启动  "sudo service ssh start"

4. 查看Ubuntu IP地址。

输入:sudo ifconfig

virtualbox 的 ubuntu18.04 安装ssh

5. 通过netplan 设置静态ip

sudo   vi /etc/netplan/50-cloud-init.yaml

sudo vi /etc/resolv.conf

6.如果出现Permission denied, please try again

执行  sudo nano /etc/ssh/sshd_config 

把PasswordAuthentication的#号去掉

把PermitRootLogin yes设置为yes

 

 

相关文章:

  • 2021-06-28
  • 2021-10-19
  • 2021-09-09
  • 2022-12-23
  • 2021-06-11
  • 2021-08-01
猜你喜欢
  • 2021-08-24
  • 2021-12-25
  • 2021-10-19
  • 2021-09-10
  • 2021-10-11
  • 2021-11-28
相关资源
相似解决方案