亚马逊云科技

广告

安信SSL证书

广告

ESXi服务器修改远程端口教程

美国云服务器推荐

ESXi本身可以看做一个操作系统,采用Linux内核,可直接安装在物理服务器上,不需安装其他操作系统。目前Megalayer香港服务器、美国服务器等物理服务器提供ESXi系统支持,您可在下单时选择该系统。ESXi服务器开通后,您可根据实际需要修改默认远程端口。下面一起来看下ESXi服务器修改远程端口的操作步骤介绍。

1、首先使用SSH工具登录到ESXi服务器(如基于ESXi系统的Megalayer香港服务器),然后修改SSH配置文件。

vi /etc/ssh/sshd_config

ESXi服务器修改远程端口

2、复制并修改应用的端口配置文件。

cp /etc/services /vmfs/volumes/datastore1/

vi /vmfs/volumes/datastore1/services

ESXi服务器修改远程端口

3、编写防火墙策略(例:62008端口)。

vi /vmfs/volumes/datastore1/ssh.xml

文件增加以下内容:

<ConfigRoot>

<service>

<id>SSH 62008</id>

<rule id = ‘0000’>

<direction>inbound</direction>

<protocol>tcp</protocol>

<porttype>dst</porttype>

<port>62008</port>

</rule>

<enabled>true</enabled>

<required>false</required>

</service>

</ConfigRoot>

4. 编写脚本,以便重启时防火墙生效。

vi /etc/rc.local.d/local.sh

======================================

#!/bin/sh # local configuration options

# Note: modify at your own risk! If you do/use anything in this

# script that is not part of a stable API (relying on files to be in

# specific places, specific tools, specific output, etc) there is a

# possibility you will end up with a broken system after patching or

# upgrading. Changes are not supported unless under direction of

# VMware support.

cp /vmfs/volumes/datastore1/ssh.xml /etc/vmware/firewall/

esxcli network firewall refresh

chmod 666 /etc/services

rm -f /etc/services

cp /vmfs/volumes/datastore1/services /etc/services

kill -HUP `cat /var/run/inetd.pid`

exit 0

5、最后,重启ESXi服务器测试。

以上是ESXi服务器修改远程端口的主要操作步骤介绍,如果您开通的是ESXi服务器,那么可参考上述步骤来修改远程端口,并使用新的端口登录。

(本文由美国主机侦探原创,转载请注明出处“美国主机侦探”和原文地址!)

主机侦探企业微信

微信扫码加好友进群

主机优惠码及时掌握

主机侦探QQ群

QQ群号:938255063

主机优惠发布与交流

温馨提示:

1、本站部分图片来源于互联网,如有侵权请联系删除。邮箱:2942802716#qq.com(#改为@)

2、本文评论没有专人回复,如果您有问题请到美国主机侦探论坛提问!

3、美国主机侦探免费为您提供美国主机购买咨询。

RAKsmart美国服务器
返回顶部