通常ssh远程登录的默认端口是22,但是因为端口22属于高危端口,因此很多时候作为服务器会被关掉,不过这个端口一般是可以更改或者添加的,这样除了22端口,也可以通过别的端口进行访问. 1.首先修改配置文件 vim /etc/ssh/sshd_config 找到Port 22一段,这里是标识默认使用22端口,修改为如下: # If you want to change the port on a SELinux system, you have to tell # SELinux about th…
为提高Linux系统安全性,我们经常会修改ssh端口,下面以CentOS 6为例: vi /etc/ssh/sshd_config 修改ssh端口,默认配置如下: 修改为自己想要的端口号(小于65535,不要和常用服务端口号冲突),如下图的5678: 重启ssh服务,则端口号生效 service sshd restart 还有更重要的一点不要忘记:修改iptables规则,放行ssh新端口 vi /etc/sysconfig/iptables 重启iptables服务 service iptab…
wamp server 环境安装包 修改默认80端口 D:\wamp\bin\apache\apache2.4.9\conf\httpd.conf 找到如下代码出修改后,重启apache即可 ## Listen: Allows you to bind Apache to specific IP addresses and/or# ports, instead of the default. See also the <VirtualHost># directive.## Change this…