CentOS 7 sshd 链接被拒绝问题,端口改变成2200

1,服务器链接不上

ssh: connect to host XXXXX port 22: Connection refused

原因,centos7 修改了链接的端口变成 2200了。

#Port 22
Port 2200

修改回去,或使用2200链接。

修改:vi /etc/ssh/sshd_config

2,centos7默认安装了防火墙不是iptables了

因为是本地测试,所以直接关闭防火墙,禁用开机启动。

systemctl stop firewalld

systemctl disable firewalld

3,关闭selinux

vi /etc/selinux/config

修改以下内容

#SELINUX=enforcing #注释掉

#SELINUXTYPE=targeted #注释掉

SELINUX=disabled #增加

时间: 2024-08-06 06:33:19

CentOS 7 sshd 链接被拒绝问题,端口改变成2200的相关文章

centOS 安装Redis并开启对应的端口服务

1,安装CentOS 7,安装时记住勾选web服务器或者其他功能较全的工具,否则连最基本的ifconfig都用不了 2,新装的看看/etc/sysconfig/ 下有没有iptables,看看service iptables start 能不能正常启动,如果不能启动则用root用户,yum -install iptables 进行防火墙安装 3,安装好后,要让外面访问进来有两种方式:1,关闭防火墙 chkconfig iptables off(重启后生效) 2,开放端口访问权限 vi /etc/

centos修改sshd的端口

cd /etc/ssh 进入ssh目录 ls 用vim编辑器打开sshd_config vim sshd_config 修改port为你自己想要的端口号. 然后按ESC->wq 保存退出. 重启ssh服务即可.

CentOS配置sshd

用SSH来远程管理计算机,就不用到计算机实际地点来回跑了 环境:服务器:CentOS6.6,客户机win8.1 putty 配置服务器: 1.检查SSHD是否安装(默认情况下是系统自带的),使用命令 rpm -qa |grep ssh 结果如下表示已经安装 [[email protected] ~]# rpm -qa |grep ssh libssh2-1.4.2-1.el6.i686 openssh-server-5.3p1-104.el6.i686 openssh-5.3p1-104.el6

CentOS 6、CentOS7 防火墙开放指定端口

当我们在CentOS服务器中装了一些开发环境(如 tomcat.mysql.nginx 等...)时,希望能从外界访问,就需要配置防火墙对指定端口开放. CentOS 6.51.开放指定端口/sbin/iptables -I INPUT -p tcp --dport 端口号 -j ACCEPT   //写入修改/etc/init.d/iptables save                                       //保存修改service iptables restart

centos(linux) 下如何查看端口占用情况及杀死进程

使用这个命令:netstat -nap [[email protected] sphinx]# netstat -nap Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name 杀死进程 使用kill命令结束进程:kill XXX   常

CentOS 5.5 下修改Apache默认端口80

打开  /etc/httpd/conf/httpd.conf  文件 修改两个地方     #Listen 12.34.56.78:80     Listen 80 #把80改为你设置的端口,我设置端口为5555 Listen 5555 NameVirtualHost *:80     #把80改为你设置的端口,我设置端口为5555     NameVirtualHost *:5555 保存修改,退出. semanage port -a -t http_port_t -p tcp 5555   

CentOS相关资源链接

CentOS系统国内镜像网站: 清华镜像:   https://mirrors.tuna.tsinghua.edu.cn/centos/ 中科大镜像:http://centos.ustc.edu.cn/centos/ 阿里云镜像:https://mirrors.aliyun.com/centos/ 搜狐镜像:   http://mirrors.sohu.com/centos/ 网易镜像:   http://mirrors.163.com/centos/ 虚拟机: VMware虚拟机: http:

django 在centos 7 下 指定ip地址和端口 报错问题

windows environment: python manage.py runserver host:port centos environment: python manage.py runserver host:port raise error 修改settings.py 文件全局配置 ALLOWED_HOSTS = [ '*' ] OR ALLOWED_HOSTS= [ '127.0.0.1' ,'more_host'] 原文地址:https://www.cnblogs.com/yan

centos 软件下载链接

163源   wget http://mirrors.163.com/.help/CentOS6-Base-163.repo php    wget http://cn2.php.net/get/php-5.6.12.tar.gz nginx   wget http://nginx.org/download/nginx-1.6.2.tar.gz httpd   wget http://mirrors.sohu.com/apache/httpd-2.4.16.tar.gz Dixcuz  wget