Loading... **独立系统需要接入网线,虚拟机配置好网卡。** **网络配置:** ``` ip add cd /etc/sysconfig/network-scripts/ ls vi ifcfg-eth0Copy ``` 按【I】键,找到以下代码然后把 no 改 yes。 ``` ONBOOT=yes ``` 按【ESC】键退出,在光标处输入【:wq】保存关闭配置文件。 重启网络服务,自动获取IP。 ``` service network restart ``` **SSH配置:** ``` cd /etc/ssh/ ls vi sshd_config ``` 按【I】键,找到以下代码去掉 # 改成自定义端口。 ``` # Port 22 ``` 按【ESC】键退出,在光标处输入【:wq】保存关闭配置文件。 重启 SSH 服务。 ``` service sshd restart ``` **常用网络命令:** ``` yum install net-tools ifconfig eth0 down ifconfig eth0 up ``` **SSH常用命令:** ``` yum install openssh-server service sshd restart service sshd start service sshd stop netstat -antp | grep sshd chkconfig sshd on chkconfig sshd off ``` 最后修改:2024 年 10 月 07 日 © 允许规范转载 赞 如果觉得我的文章对你有用,请随意赞赏