vmware下CentOS7最小安装,使用的NAT的网络模式,设置静态IP和DNS

发布时间:2022-06-27 发布网站:脚本宝典
脚本宝典收集整理的这篇文章主要介绍了vmware下CentOS7最小安装,使用的NAT的网络模式,设置静态IP和DNS脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。

``

查看和安装ssh:

    yum list installed | grep openssh-server#查看     yum install openssh-server#安装     

修改配置

1.vi etc/ssh/sshd_config       1         $OpenBSD: sshd_config,v 1.100 2016/08/15 12:32:04 naddy Exp $       2       3 # This is the sshd server system-wide configuration file.  See       4 # sshd_config(5) for more information.       5       6 # This sshd was compiled with PATH=/usr/local/bin:/usr/bin       7       8 # The strategy used for options in the default sshd_config shipped with       9 # OpenSSH is to specify options with their default value where      10 # possible, but leave them commented.  Uncommented options override the      11 # default value.      12      13 # If you want to change the port on a SELinux system, you have to tell      14 # SELinux about this change.      15 # semanage port -a -t ssh_port_t -p tcp #PORTNUMBER      16 #      17 Port 22      18 #AddressFamily any      19 ListenAddress 0.0.0.0      20 ListenAddress ::      21      22 HostKey /etc/ssh/ssh_host_rsa_key      23 #HostKey /etc/ssh/ssh_host_dsa_key      24 HostKey /etc/ssh/ssh_host_ecdsa_key      25 HostKey /etc/ssh/ssh_host_ed25519_key      26      27 # Ciphers and keying      28 #RekeyLimit default none      29      30 # Logging      31 #SyslogFacility AUTH      32 SyslogFacility AUTHPRIV      33 #LogLevel INFO      34      35 # Authentication:      36      37 #LoginGraceTime 2m      38 PermitRootLogin yes      39 #StrictModes yes      40 #MaxAuthTries 6      41 #MaxSessions 10 找到17,19,20,38行。去掉#

接着开启sshd服务,检查服务是否开启

    service sshd start     ps -e | grep sshd

开机自启

    systemctl enable sshd.service

脚本宝典总结

以上是脚本宝典为你收集整理的vmware下CentOS7最小安装,使用的NAT的网络模式,设置静态IP和DNS全部内容,希望文章能够帮你解决vmware下CentOS7最小安装,使用的NAT的网络模式,设置静态IP和DNS所遇到的问题。

如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典推荐好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。
标签: