You are on page 1of 1

1.

Thay đổi địa chỉ IP cạc mạng

[tnet@localhost tnet]# /sbin/ifconfig vswif0 10.145.23.86 netmask 255.255.255.0


broadcast 10.145.23.255

Add thêm địa chỉ IP cho cạc mạng :

[root@localhost network-scripts]# /sbin/ifconfig vswif0:0 192.168.6.66 netmask


255.255.255.0 broadcast 192.168.6.255 [up]

Khởi động lại cạc mạng :

# /etc/rc.d/init.d/network restart

"esxcfg-vswif -d vswif0". This command deletes the existing vswif0. Don't


worry if you get a message about nothing to flush. Then you need to run the
command to change the ip address, subnet mask and broadcast address.
They are also specified in that order when the command is given. An
example command is below.

"esxcfg-vswif -a vswif0 -p Service\ Console -i 10.1.1.1 -n 255.255.255.0 -b


10.1.1.255"

In this command the -a switch is to add a vswif, the \ in the Service\ Console
is deliberate, the -i is the ip address, the -n is the netmask and the -b is the
broadcast address.

Access SSH

4) You should then see the prompt of ~ #. Edit the file inetd.conf (enter the
command vi /etc/inetd.conf).
5) Find the line that begins with #ssh and remove the #. Then save the file.
If you're new to using vi, then move the cursor down to #ssh line and then
press the Insert key. Move the cursor over one space and then hit
backspace to delete the #. Then press ESC and type in :wq to save the file
and exit vi. If you make a mistake, you can press the ESC key and then type
it :q! to quit vi without saving the file.
6) Once you've closed the vi editor, run the command /sbin/services.sh
restart to restart the management services. You'll now be able to connect
to the ESXi host with a SSH client.

You might also like