centos7安裝ssh服務


1、查看是否安裝了相關軟件:

rpm -qa|grep -E "openssh"

 

顯示結果含有以下三個軟件,則表示已經安裝,否則需要安裝缺失的軟件

openssh-ldap-6.6.1p1-35.el7_3.x86_64 
openssh-clients-6.6.1p1-35.el7_3.x86_64 
openssh-6.6.1p1-35.el7_3.x86_64 
openssh-askpass-6.6.1p1-35.el7_3.x86_64 
openssh-server-6.6.1p1-35.el7_3.x86_64 
openssh-keycat-6.6.1p1-35.el7_3.x86_64 
openssh-server-sysvinit-6.6.1p1-35.el7_3.x86_64

2、安裝缺失的軟件:

sudo yum install openssh*

 

3、注冊使用服務:

sudo systemctl enable sshd sudo systemctl start sshd 或者 service sshd start 

 

4、開啟防火牆的22端口: 
具體防火牆使用可以參見:http://www.cnblogs.com/moxiaoan/p/5683743.html

sudo firewall-cmd --zone=public --add-port=22/tcp --permanent sudo service firewalld restart 

 

5、備注:虛擬機如果和主機進行測試,需要將網絡模式修改為2. Bridged Adapter,具體參見:http://blog.csdn.net/ixidof/article/details/12685549

 

 

 

轉載自:http://blog.csdn.net/mengyoufengyu/article/details/72855524


免責聲明!

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



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