Contents
SSHによるリモート接続
ESXi ホストに SSH アクセスして、コマンドで操作する
SSHの有効化
①ダイレクトコンソールから設定する方法
root ユーザーアカウントでログインし、[Troubleshooting Options] をクリック

[Enable SSH] をクリック

[SSH is Enabled]になっている

➁VMware Host Client で有効化する方法
[管理]-[サービス]で[TSM-SSH]を選択し、[アクション]から[起動]をクリック

自動起動設定する場合は[アクション]-[ポリシー]で[ホストと連動して起動および停止します]を選択する

NTP : 時刻同期
ESXi はデフォルトでは、時刻同期の設定は無効となっている。
ESXi ではタイムゾーンの手動設定は不可で、タイムゾーンは UTC に設定され、システム上のファイルやログ等のタイムスタンプは、UTC 時刻で記録される。
よってタイムゾーンが日本の場合、システム上の時刻は、[日本の現在時刻 - 9] となる。
① 現在の NTP の状態
1 2 3 4 5 6 7 8 9 |
[root@lepard:~] esxcli system ntp get Enabled: false Loglevel: warning PID: 0 Runtime Seconds: 0 Servers: Service Providing Kernel Time: Time Service Enabled: false Time Synchronized: false |
➁NTP サーバーを設定してサービスを有効化
1 2 |
[root@ctrl:~] esxcli system ntp set --server=192.168.11.83 --server=ntp.nict.jp [root@ctrl:~] esxcli system ntp set --enabled=yes |
➂設定変更が反映されているか確認(少し時間をおいてから確認)
1 2 3 4 5 6 7 8 9 |
[root@lepard:~] esxcli system ntp get Enabled: true Loglevel: warning PID: 134701 Runtime Seconds: 247 Servers: 192.168.11.83, ntp.nict.jp Service Providing Kernel Time: Network Time Protocol Time Service Enabled: true Time Synchronized: true |
1 2 3 4 5 |
[root@lepard:~] ntpq -p remote refid st t when poll reach delay offset jitter ============================================================================== lepard .INIT. 16 u - 64 0 0.000 +0.000 0.000 *ntp-k1.nict.jp .NICT. 1 u 42 64 37 8.873 +0.886 2.019 |
現在時刻を確認して表示される事項に+9になっていれば同期されています
1 2 |
[root@lepard:~] date Thu Nov 9 02:05:14 UTC 2023 |