共用方式為


Az.Ssh Module

這是一個預覽模塊。 不建議在生產環境中使用預覽模組。 如需詳細資訊,請參閱。

此模組允許你使用 SSH(安全殼層)建立與 Azure 資源(如 Azure 虛擬機或 Arc 伺服器)的互動式 shell 連線。 連線可透過 Microsoft Entra 帳號或本地機器帳號建立。 請注意,此模組需要在用戶端計算機上安裝並探索 OpenSSH。 重要注意:當連接 Azure Arc 資源時,此模組也要求在用戶端機器中安裝 Az.Ssh.ArcProxy 模組。 這些 cmdlets 會嘗試從 PowerShell Gallery 安裝模組,但使用者也可以選擇自行安裝。 用戶也必須有權在 Az.Ssh.ArcProxy 模組中執行 Proxy 檔案,否則連線將會失敗。 你可以在 PowerShell Gallery 中找到 Az.Ssh.ArcServer 模組:https://aka.ms/PowerShellGallery-Az.Ssh.ArcProxy

SSH

指令程式 Description
Enter-AzVM

Starts an interactive SSH session to an Azure Resource (such as Azure VMs or Arc Servers). Users can login using Microsoft Entra accounts, or local user accounts via standard SSH authentication. Use Microsoft Entra account login for the best security and convenience.

Export-AzSshConfig

This cmdlet exports an SSH configuration file that can be used to connect to Azure Resources through client applications that support OpenSSH config and certificates. SSH config files can be created that use Microsoft Entra ID issued certificates or local user credentials.