在windows中,使用SSH登录VMware ubuntu linux虚拟机

测试环境

主机:window7 sp1 64位 专业版
虚拟机:VMware workstation 12 player
虚拟机操作系统: ubuntu 16.4
目标:在ubuntu下运行SSH服务,从宿主操作系统windows7中,登录ubuntu


虚拟机VMware的设置

VMware的网络适配器设置为NAT方式


linux内的设置

Step1 检查ssh-server有没有启动

ps -e | grep ssh

如果只有ssh-agent,而没有sshd,说明ssh-server没有启动

Step2 安装OpenSSH服务器

安装前可以通过linux内的浏览器是否能够打开网页来验证能否上网。虚拟机VMware的网络可以设置为NAT模式。

sudo apt-get install openssh-server

再次检查ssh-server是否启动,看到sshd说明服务已经启动

ps -e | grep ssh

Step3(option )安装OpenSSH

安装OpenSSH客户端(linux下)

sudo apt-get install openssh-client

Step4 查看linux网卡地址

linux的网卡设置为自动获取地址。查看网卡地址

ifconfig

我的网卡名称是 ens33, 地址是192.168.75.131


windows中的设置

Step1: 在网络连接中,检查VMnet8已经启动,NAT方式使用VMnet8网卡。

VMnet8使用自动获取地址方式

ipconfig

我的VMnet8地址为 192.168.75.1 ,和虚拟机网卡在同一网段

Step2:检查是否能够ping 到VMnet8的地址和linux网卡的地址

ping 192.168.75.1   //我的VMnet8网卡地址
ping 192.168.75.131   //虚拟机中linux的网卡地址

Step3: 安装PuTTy并连接到Linux

PuTTy是一个网络客户端,在www.putty.org下载windows下的安装包,并安装。
putty

使用Putty登录到Linux

原文地址:https://www.cnblogs.com/lion-zheng/p/7500083.html