轉載:博客園 centos 7.6修改ssh端口,設置防火牆規則 - ray-bk - 博客園 (cnblogs.com) 修改ssh服務器默認端口號 - Cqlismy - 博客園 (cnblogs.com) 一、修改ssh端口 1 使用 root 用戶進入 /etc/ssh目錄 ...
一 修改ssh端口 使用 root 用戶進入 etc ssh目錄 備份ssh配置文件 cp sshd config sshd config bak 使用 vim 打開sshd config文件:vim sshd config 找到 Port哪一行,在相面添加一行 Port Port 保存,退出。 重啟ssh服務:systemctl restart sshd 二 設置防火牆規則 我機器上是關閉sel ...
2019-10-29 17:39 0 1281 推薦指數:
轉載:博客園 centos 7.6修改ssh端口,設置防火牆規則 - ray-bk - 博客園 (cnblogs.com) 修改ssh服務器默認端口號 - Cqlismy - 博客園 (cnblogs.com) 一、修改ssh端口 1 使用 root 用戶進入 /etc/ssh目錄 ...
啟動防火牆 systemctl start firewalld systemctl enable firewalld 關閉防火牆 systemctl stop firewalld systemctl disable firewalld 查看防火牆版本 firewall-cmd ...
CentOS升級到7之后用firewall代替了iptables來設置Linux端口, 下面是具體的設置方法: []:選填 <>:必填 [<zone>]:作用域(block、dmz、drop、external、home、internal、public、trusted ...
首先 先做的就是 修改ssh的默認端口22 需要修改文件 /etc/ssh/sshd_config 使用命令 vi /etc/ssh/sshd_config [root@localhost ~]# vi /etc/ssh/sshd_config ...
為現有規則的屬性設置新值 show 顯示指定的防火牆規則 ...
注意的是,設置端口規則時防火牆必須是啟動狀態 3.配置需要開發的端口 ...
廢話不多說,先通過當前的SSH端口(默認為:22)登陸。 1、修改配置文件:/etc/ssh/sshd_config ,找到 #port 22 2、先將Port 22 前面的 # 號去掉,並另起一行。如定義SSH端口號為33322,則輸入Port 33322自定義端口選擇建議在萬位的端口 ...
防火牆 啟動防火牆: systemctl start firewalld 查看防火牆狀態: systemctl status firewalld 關閉防火牆: systemctl stop firewalld 開機時啟用防火牆服務:systemctl enable ...