A Microsoft cloud service that enables deployment of Azure services across hybrid and multicloud environments.
Hello Georgiev, Ivan,
Yes, SCP can be used with an Azure Arc-enabled Linux server. You do not generate the configuration through az`` ``ssh`` ``arc. Instead, use az`` ``ssh`` ``config and specify the Arc server resource type.
Generate the SSH configuration:
az ssh config `
--resource-group <ResourceGroupName> `
--name <ArcServerName> `
--resource-type Microsoft.HybridCompute/machines `
--subscription <SubscriptionId> `
--file .\sshconfig
If you are connecting with a local Linux account, include:
--local-user <LinuxUserName>
Then open the generated sshconfig file and check the value shown after Host. Use that host alias with SCP:
scp.exe -F .\sshconfig .\blabla.txt <HostAlias>:~/
For example, when using a local user, the alias may appear similar to:
<ResourceGroupName>-<ArcServerName>-<LinuxUserName>
Therefore, the SCP command would be:
scp.exe -F .\sshconfig .\blabla.txt <ResourceGroupName>-<ArcServerName>-<LinuxUserName>:~/
`
az ``ssh`` ``config supports both Azure VMs and Azure Arc-enabled servers and creates a configuration that can be used by OpenSSH-based tools such as SCP, rsync, and Git. az`` ``ssh`` ``arc itself is primarily used to initiate the SSH connection and does not generate the reusable config file.
Also ensure that SSH access is enabled for the Arc server, sshd is running, and the Azure CLI SSH extension is current:
az extension add --upgrade --name ssh
For Arc connections, SSH extension version 2.0.4 or later is required.
References: