Centos7 远程登录端口22 设置

摘要:
步骤1#检查此计算机上是否安装了SSH软件包[root@localhost~]#rpm qa|grepsshopensh-server-6.6.1p1-12.el7_1.x86_64openssh-clients--6.6.1b1-12.el7 _1.x86_64blibssh2-1.4-3-8.el7.x86_64openssh--6.6.1p1-12.el7_1.xx86_64#如果没有,您需要安装[root

第一步

#查看本机是否安装SSH软件包

[root@localhost ~]# rpm -qa | grep 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

#如果没有,则需要安装

[root@localhost /]# yum install openssh-server

 

第二步

#开启 SSH 服务

[root@localhost ~]# service sshd start

Redirecting to /bin/systemctl start  sshd.service

 

#查看TCP 22端口是否打开

[root@localhost ~]# netstat -ntpl | grep 22

tcp        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 远程登录端口22 设置》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇Jquery学习笔记(7)--京东导航菜单精通shell编程--最后的总结下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

SCP和Rsync远程拷贝的几个技巧

scp是secure copy的简写,用于在Linux下进行远程拷贝文件的命令,和它类似的命令有cp,不过cp只是在本机进行拷贝不能跨服务器,而且scp传输是加密的。可能会稍微影响一下速度。当你服务器硬盘变为只读 read only system时,用scp可以帮你把文件移出来。另外,scp还非常不占资源,不会提高多少系统负荷,在这一点上,rsync就远远...

hadoop集群的搭建与配置(1)

前言             首先hadoop是在linux系统上进行搭建的,我们首先要在自己电脑上装上虚拟机然后装linux系统,因为我们是测试:在本地虚拟机上装两个linux分别搭建好hadoop环境能实现简单的数据处理就可以了,最终的效果类似于我们c#中的hello world!能做到这里我们的搭建测试环境就算基本上完成了。虚拟机以及linux系统...

VMware ESXi 6.7主机启用 Shell 及 SSH 服务

第一步、ESXI打开ssh功能按住F2进入设置如下图: 第二步、输入密码 第三步、选择 Troubleshooting Options 菜单,按下 Enter 进入 第四步、选中 ESXi Shell 菜单,按下 Enter,使右边显示“ESXi Shell is Enabled”,连续按 Esc 退出即可 第五步、通过Xshell工具连接ESXI...

ubuntu下允许root用户ssh远程登录

SSH服务器,可以通过SSH协议来访问远程服务器,代替telnet和ftp。但是ubuntu默认是不启用root用户也不允许root远程登录的。所以需要先启用root用户 启用root用户:sudo passwd root      //修改密码后就启用了。 安装OpenSSH server: 1. 使用apt命令安装openssh server $ su...

apache mina sshd ,纯java的ssh工具包

Overview Apache SSHD is a 100% pure java library to support the SSH protocols on both the client and server side. This library is based on Apache MINA, a scalable and high perfor...

git clone error:RPC failed; curl 18 transfer closed with outstanding read data remaining

git clone时报RPC failed; curl 18 transfer closed with outstanding read data remaining 错误 error: RPC failed; curl 18 transfer closed withoutstanding read data remaining fatal: The re...