- The following software is required before operation, and Ubuntu is installed on the VMware workstation.
ubuntu16 .04 lts
vmware workstation
securecrt
- VMware's edit tab-> virtual Network Edit menu to view network configuration:
Sub-NetworkIP: 192. 168.. 0
Subnet Mask: 255. 255. 255. 0
GatewayIP: 192. 168.. 1
1. su
in the Enter mode, vi /etc/network/interfaces
set the virtual machine IP to static
the following configuration:
You can also change the ens33 to eth0.
2. Set up the DNS server information,vi /etc/resolv.conf
nameserver180...BaiduDNS
nameserver223. 5. 5. 5AliDNS
nameserver192. 168.. 1Gateway Address
3. Configure the gateway addressroute add default gw 192.168.92.1
4. Restart the Network Service, command:
/etc/init.d/networking reload
sudo /etc/init.d/networking restart
5. In general, the network should be able to connect, ping www.baidu.com
can be ping, if not, then continue to try the following methods:
- Restart and stop the virtual network card:
ifconfig eth0 down
ifconfig eth0 up
- To restart Ubuntu:
shutdown -r now
Orreboot
6. Network OK, but cannot connect to host from remote SSH
ps -e|grep ssh
Found no sshd
service
执行:
install openssh-sever
正在读取软件包列表...
完成正在分析软件包的依赖关系树正在读取状态信息...
完成现在没有可用的软件包 openssh-server,
但是他被其他的软件包引用了这可能意味着这个缺失的软件包可能已被废弃,或者只能在其他发布源中找到
E:软件包 openssh-server 还没有可供安装的候选者
- Solution:
apt-get
No update, execute:
7. Perform the installation after the update is complete:
install openssh-server
8. Start the SSH service:
start
netstat -tlp
You can also ps -e|grep ssh
see if the Open-server installation is successful,
9. Modify the SSH configuration,vi /etc/ssh/sshd_config
10. Connect secureCRT
192.168.92.128
The virtual machine with the client and connect OK.
Ubuntu network configuration and SSH remote connection