ESXi服務器修改遠程端口教程

ESXi本身可以看做一箇操作系統,採用Linux內核,可直接安裝在物理服務器上,不需安裝其他操作系統。目前Meglye香港服務器、美國服務器等物理服務器提供ESXi系統支持,您可在下單時選擇該系統。ESXi服務器開通後,您可根據實際需要修改默認遠程端口。下面一起來看下ESXi服務器修改遠程端口的操作步驟介紹。

、首先使用SSH工具登錄到ESXi服務器(如基於ESXi系統的Meglye香港服務器),然後修改SSH配置文件。

i /etc/ssh/sshd_config

2、複製並修改應用的端口配置文件。

cp /etc/seices /mfs/olumes/dtstoe/

i /mfs/olumes/dtstoe/seices

3、編寫防火牆策略(例:62008端口)。

i /mfs/olumes/dtstoe/ssh.xml

文件增加以下內容:

<ConfigRoot>

<seice>

<id>SSH 62008</id>

<ule id = ̺0000̻>

<diection>inbound</diection>

<potocol>tcp</potocol>

<pottype>dst</pottype>

<pot>62008</pot>

</ule>

<enbled>tue</enbled>

<equied>flse</equied>

</seice>

</ConfigRoot>

4. 編寫腳本,以便重啓時防火牆生效。

i /etc/c.locl.d/locl.sh

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

#!/bin/sh # locl configution options

# Note: modify t you own isk! If you do/use nything in this

# scipt tht is not pt of stble API (elying on files to be in

# specific plces, specific tools, specific output, etc) thee is

# possibility you will end up with boken system fte ptching o

# upgding. Chnges e not suppoted unless unde diection of

# VMwe suppot.

cp /mfs/olumes/dtstoe/ssh.xml /etc/mwe/fiewll/

esxcli netwok fiewll efesh

chmod 666 /etc/seices

m -f /etc/seices

cp /mfs/olumes/dtstoe/seices /etc/seices

kill -HUP `ct //un/inetd.pid`

exit 0

5、最後,重啓ESXi服務器測試。

以上是ESXi服務器修改遠程端口的主要操作步驟介紹,如果您開通的是ESXi服務器,那麼可參考上述步驟來修改遠程端口,並使用新的端口登錄。