virtualBox本地虚拟机通过ssh连接一般可通过桥接模式和Nat模式

桥接模式下,共享本地主机网卡,在同一个局域网之下,直接获取Ip地址就可以进行连接了。

Nat模式下,获取的Ip与本地主机不是同一个网段,需要做端口转发,才能本地ssh连接虚拟机。

具体设置步骤如下:

1、选择端口转发

VirtualBox 本地机器ssh连接配置

VirtualBox 本地机器ssh连接配置

 

2、主机Ip为为空 默认localhost 可以设置127.0.0.1,主机端口可以随意设置,不与系统端口冲突则行,子系统端口22,也是ssh默认连接的端口

VirtualBox 本地机器ssh连接配置

 

接下来用ssh连接localhost,就行

VirtualBox 本地机器ssh连接配置

 

VirtualBox 本地机器ssh连接配置

VirtualBox 本地机器ssh连接配置

相关文章:

  • 2022-12-23
  • 2021-09-21
  • 2021-07-19
  • 2021-04-11
  • 2022-12-23
  • 2022-12-23
  • 2021-10-03
  • 2021-11-27
猜你喜欢
  • 2021-06-29
  • 2022-01-12
  • 2022-01-08
  • 2021-08-19
  • 2021-10-07
  • 2022-02-15
  • 2022-01-12
相关资源
相似解决方案