Vm 于本地计算机 SSH 连接 Date:2018/12/15 更改配置文件 /etc/ssh/sshd_config 确保 ``` Port 22 ~~ListenAddress 0.0.0.0~~ Protocol 2 ``` ifconfig vm与主机相互 ping 下ip 关闭防火墙 systemctl stop iptables.service 查看防火墙端口 firewall-cmd --list-all //临时关闭防火墙,重启后会重新自动打开 systemctl restart firewalld //检查防火墙状态 firewall-cmd --state firewall-cmd --list-all //Disable firewall systemctl disable firewalld systemctl stop firewalld systemctl status firewalld //Enable firewall systemctl enable firewalld systemctl start firewalld systemctl status firewalld 开启ssh 服务(Centos.7) systemctl start sshd.service 开机启动 systemctl enable sshd.service 重启 systemctl restart sshd.service ------------------------ 查看默认的target,执行: systemctl get-default 开机以命令模式启动,执行: systemctl set-default multi-user.target 开机以图形界面启动,执行: systemctl set-default graphical.target Last updated: 3 years ago (2018-12-15)
评论已关闭