virtual box 安装ubuntu

网络配置选择桥接模式,主机和虚拟机间可以通信。

https://www.cnblogs.com/wish123/p/9277995.html

 

ssh 连接需要配置秘钥:

  1. 安装ssh 

  2. 生成秘钥文件

       ssh-****** -t rsa -P "" -f ~/.ssh/id_rsa

       cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys

 

 

使用桥接方式 配置/etc/network/interfaces 无用,需要配置/etc/netplan/50-cloud-init.yaml

执行修改命令: netplan apply

 

注意:其中网卡名称 enp0s3 需要和ifconfig中查到的网卡保持一致

 

主机通过ssh连接虚拟机转存失败重新上传取消主机通过ssh连接虚拟机

相关文章:

  • 2021-12-02
  • 2021-06-27
  • 2021-09-01
  • 2022-12-23
  • 2021-06-21
  • 2021-08-08
  • 2021-11-28
猜你喜欢
  • 2022-12-23
  • 2021-06-11
  • 2021-09-25
  • 2021-07-06
  • 2021-06-11
  • 2021-11-01
  • 2021-09-25
相关资源
相似解决方案