Post author:Nita Post last modified:29 6 月, 2022 Step1 : 下載ssh $ sudo yum install openssh* Step2 : 設定 ssh config $ sudo vi /etc/ssh/sshd_config ## 1. 修改登入 port ( 預設為22 ) port 55442 ## 2. 限定登入者 將下列設定自行新增到檔案最後 AllowUsers id1 id2 ## 3. 註解拿掉 PermitEmptyPasswords noPasswordAuthentication yes ## 4. 限制root帳號登入 PermitRootLogin no Step3 : 啟動ssh / 設定開機時自動啟動 重新啟動 ssh $ sudo systemctl restart sshd.service 設定開機時自動啟動ssh $ sudo systemctl enable sshd.service Step4 : Firewall 防火牆設定 開啟防火牆 $ sudo firewall-cmd –permanent –zone=public –add-port=55442/tcp re-load 防火牆 $ sudo firewall-cmd –reload 以上ssh就已經安裝設定完成 可以輸入 netstat -ant 看看剛剛的55442 PORT有沒有加入監控中. Let's change the world together Share this content Opens in a new window Twitter Opens in a new window Facebook Opens in a new window Pinterest You Might Also Like Centos7 正在查找主機 … 失敗: 未知的名稱或服務。 30 12 月, 2018 CentOS 7 設定PPPOE 固定IP連線 30 5 月, 2022 受保護的內容: 自行架設主機 1 6 月, 2022