虛擬機的上網方式的選擇一般是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破解一下更牛逼
可能是喜歡折騰煩人的服務器連接配置文件
你覺得呢,請告訴我