Centos7开启SSH服务
2017-10-04 01:04
537 查看
其实,CentOS 7安装完成,默认是已经打开了22端口的。
SSH 为 Secure Shell 的缩写,由 IETF 的网络工作小组(Network Working Group)所制定;SSH 为建立在应用层和传输层基础上的安全协议。SSH 是目前较可靠,专为远程登录会话和其他网络服务提供安全性的协议。
第一步
openssh-server-6.6.1p1-12.el7_1.x86_64
openssh-clients-6.6.1p1-12.el7_1.x86_64
libssh2-1.4.3-8.el7.x86_64
openssh-6.6.1p1-12.el7_1.x86_64
第二步
Redirecting to /bin/systemctl start sshd.service
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 17816/sshd
tcp6 0 0 :::22 :::* LISTEN 17816/sshd
第三步
[root@localhost ~]# iptables -nL
你可以将防火墙中的规则条目清除掉:
SSH 为 Secure Shell 的缩写,由 IETF 的网络工作小组(Network Working Group)所制定;SSH 为建立在应用层和传输层基础上的安全协议。SSH 是目前较可靠,专为远程登录会话和其他网络服务提供安全性的协议。
第一步
查看本机是否安装SSH软件包
[root@localhost ~]# rpm -qa | grep sshopenssh-server-6.6.1p1-12.el7_1.x86_64
openssh-clients-6.6.1p1-12.el7_1.x86_64
libssh2-1.4.3-8.el7.x86_64
openssh-6.6.1p1-12.el7_1.x86_64
如果没有,则需要安装
[root@localhost /]# yum install openssh-server第二步
开启 SSH 服务
[root@localhost ~]# service sshd startRedirecting to /bin/systemctl start sshd.service
查看TCP 22端口是否打开
[root@localhost ~]# netstat -ntpl | grep 22tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 17816/sshd
tcp6 0 0 :::22 :::* LISTEN 17816/sshd
第三步
接下来便可使用终端仿真程序(例如putty)去登陆远程主机
如果你在客户端不能连接SSH服务的话,那可能是防火墙的原因,终端命令行中输入 iptables -nL 来看是否开放了ssh tcp 22 端口:[root@localhost ~]# iptables -nL
你可以将防火墙中的规则条目清除掉:
[root@localhost ~]# iptables -F
相关文章推荐
- CentOS7开启SSH服务
- CentOS7开启SSH服务
- 开启Centos系统的SSH服务
- Ubuntu 16.04开启SSH服务
- 虚拟机下CentOS7开启SSH连接
- ubuntu开启SSH服务
- ubuntu开启ssh服务
- Linux如何开启Centos6.4系统的SSH服务
- ubuntu开启SSH服务
- Ubuntu查看ssh服务是否开启
- centos7开通ssh服务
- Ubuntu下开启SSH服务
- docker 容器开启ssh服务
- 【Linux学习】配置环境:实现【VirtualBox + ubuntu】+【开启ssh服务】+【putty远程连接到虚拟机】
- Linux ssh开启服务
- 虚拟机下CentOS7开启SSH连接
- ubuntu开启SSH服务
- QNX系统下开启SSH服务步骤
- RedHat 9 Linux开启SSH服务命令
- ubuntu开启ssh服务