Skip to content

Commit 7c03424

Browse files
authored
Update config related help for clarity (Azure#3231)
1 parent b6d8fda commit 7c03424

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/ssh/azext_ssh/_help.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,28 @@
2424

2525
helps['ssh config'] = """
2626
type: command
27-
short-summary: Create an SSH config for resources (Azure VMs, etc) which can then be imported to 3rd party SSH clients
27+
short-summary: Create an SSH config for resources (Azure VMs, etc) which can then be used by clients that support OpenSSH configs and certificates
28+
long-summary: Other software (git/rsync/etc) that support setting an SSH command can be set to use the config file by setting the command to 'ssh -F /path/to/config' e.g. rsync -e 'ssh -F /path/to/config'
2829
examples:
2930
- name: Give a resource group and VM for which to create a config, and save in a local file
3031
text: |
3132
az ssh config --resource-group myResourceGroup --vm-name myVm --file ./sshconfig
32-
- name: Give the public IP (or hostname) of a VM for which to create a config
33+
- name: Give the public IP (or hostname) of a VM for which to create a config and then ssh
3334
text: |
3435
az ssh config --ip 1.2.3.4 --file ./sshconfig
36+
ssh -F ./sshconfig 1.2.3.4
3537
- name: Create a generic config for use with any host
3638
text: |
3739
#Bash
3840
az ssh config --ip \\* --file ./sshconfig
3941
#PowerShell
4042
az ssh config --ip * --file ./sshconfig
43+
- name: Examples with other software
44+
text: |
45+
#Bash
46+
az ssh config --ip \\* --file ./sshconfig
47+
rsync -e 'ssh -F ./sshconfig' -avP directory/ myvm:~/directory
48+
GIT_SSH_COMMAND="ssh -F ./sshconfig" git clone myvm:~/gitrepo
4149
"""
4250

4351
helps['ssh cert'] = """

0 commit comments

Comments
 (0)