window11环境 VMware下安装centos
网络检查没问题后,window可以ping通虚拟机下的centos
没网络可以参考这个
centos7设置固定(静态)IP_涛哥哥哥呀的博客-CSDN博客
1. 安装openssh-server
yum install -y openssl openssh-server
2. 修改配置文件
用vim
打开配置文件/etc/ssh/sshd_config
将上图的PermitRootLogin
,PubkeyAuthentication
的设置打开。
3.启动ssh的服务:
systemctl start sshd.service
4.设置开机自动启动ssh服务
systemctl enable sshd.service
5.用window下cmd测试下,
ssh root@192.168.32.200
可能会出现输入正常密码。提示“Permission denied”的情况
将 /etc/ssh/sshd_config
PasswordAuthentication no #no改为yes