虚拟机的上网方式的选择一般是VMnet8
step1. 服务器安装ssh server
Ubuntu系统示例
sudo apt-get update
sudo apt-get install openssh-server
sudo service ssh restart
step2. 打开ssh服务端配置,开启root用户密码登录验证
sudo gedit /etc/ssh/sshd_config
输入并保存
PermitRootLogin yes
PasswordAuthentication yes
step3. 重启一下ssh服务
sudo service ssh restart
/etc/init.d/ssh restart
step4. 给root用户设置非随机密码
sudo passwd
step5. 验证root用户密码
su root
su 命令切换回你的普通用户
su 普通用户
step6. 安装ifconfig并查看服务器IP
CentOS系统
yum install net-tools.x86_64
ifconfig
Ubuntu系统
sudo apt install net-tools
ifconfig
step7. MobaXterm的SSH连接
为何公司普遍用Xshell
可能是Xshell破解一下更牛逼
可能是喜欢折腾烦人的服务器连接配置文件
你觉得呢,请告诉我