Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
PowerShell remoting over SSH can be used to enable SSH connectivity on Arc-enabled servers.
Prerequisites
To use PowerShell remoting over SSH access to Azure Arc-enabled servers, you must:
- Meet the prerequisites for SSH access to Azure Arc-enabled servers.
- Meet the requirements for PowerShell remoting over SSH.
- Ensure the Azure PowerShell module (Az.Ssh) or the Azure CLI extension (az ssh) is installed on the client machine.
Connect via PowerShell remoting
Complete the following steps to connect via PowerShell remoting to an Arc-enabled server.
Generate the SSH config file
az ssh config --resource-group <myRG> --name <myMachine> --local-user <localUser> --resource-type Microsoft.HybridCompute --file <SSH config file>
Find the newly created entry in the SSH config file
Open the created or modified SSH config file. The entry should have a similar format to the following sample file:
Host <myRG>-<myMachine>-<localUser>
HostName <myMachine>
User <localUser>
ProxyCommand "<path to proxy>\.clientsshproxy\sshProxy_windows_amd64_1_3_022941.exe" -r "<path to relay info>\az_ssh_config\<myRG>-<myMachine>\<myRG>-<myMachine>-relay_info"
Use the -Options
parameter
Using the -Options
parameter allows you to specify a hashtable of SSH options used when connecting to a remote SSH-based session.
Create the hashtable using the format of the following sample. Be mindful of the locations of quotation marks.
$options = @{ProxyCommand = '"<path to proxy>\.clientsshproxy\sshProxy_windows_amd64_1_3_022941.exe -r <path to relay info>\az_ssh_config\<myRG>-<myMachine>\<myRG>-<myMachine>-relay_info"'}
Next, use the -Options
hashtable in a PowerShell remoting command:
New-PSSession -HostName <myMachine> -UserName <localUser> -Options $options
Next steps
- Learn about OpenSSH for Windows.
- Learn about troubleshooting SSH access to Azure Arc-enabled servers.
- Learn about troubleshooting agent connection issues.