【CentOS】檢查系統是否安裝OpenSSH


CentOS7 遠程聯機

嗶哩嗶哩 萌狼藍天

博客:https://mllt.cc

微信公眾號:萌狼藍天

檢查與安裝配置OpenSSH

[CentOS7]檢查系統是否安裝OpenSSH

yum -q list openssh-server

如果沒有安裝可使用如下命令安裝

yum -y install oepnssh-server

[CentOS7]檢查系統是否啟動OpenSSH服務器

systemctl status sshd

image-20210906095949556

如果OpenSSH服務器沒有啟動,則手動啟動

systemctl start sshd

[CentOS7]設置sshd開機自動啟動

systemctl enable sshd

如果設置sshd啟動后,sshd狀態仍沒有啟動,檢查防火牆是否阻止了ssh服務

firewall-cmd --list-service

image-20210906100442155

出現該結果則是沒問題的

如果沒有出現該結果,則需要你自己去添加ssh服務(下面這個是永久加入的命令,不想永久加入的話,最后不寫permanent就可以了)

firewall-cmd --add-service ssh permanent

安裝xshell

[Windows]搜索xshell,進入官網

Free for Home/School - Xshell and Xftp Free Licensing (netsarang.com)

image-20210906102015467

image-20210906102046114

你將會收到一封郵件

點擊郵件中的下載鏈接即可進行下載,下載后完成安裝即可。

配置與連接CentOS7

[Windows]打開xshell

image-20210906102214362

不知道CentOS IP地址的,在CentOS終端中輸入ifconfig

image-20210906100834465

image-20210906101513310

image-20210906101611330

image-20210906101623760

xshell中出現如下內容,則為連接成功

image-20210906102315699


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM