你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Az.Ssh

通过此模块,可以使用 SSH(安全外壳)创建与 Azure 资源(例如 Azure VM 或 Arc 服务器)的交互式 shell 连接。 可以使用 Microsoft Entra 帐户或本地计算机帐户建立连接。 请注意,此模块要求在客户端计算机上安装并发现 OpenSSH。 重要说明:连接到 Azure Arc 资源时,此模块需要同时在客户端计算机中安装 Az.Ssh.ArcProxy 模块。 cmdlet 将尝试从PowerShell 库安装模块,但用户还可以选择自行安装该模块。 用户还必须有权在 Az.Ssh.ArcProxy 模块中执行代理文件,否则连接将失败。 可以在 PowerShell 库 https://aka.ms/PowerShellGallery-Az.Ssh.ArcProxy中找到 Az.Ssh.ArcServer 模块。

SSH

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.