You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Document SSH config Include usage for easier Lima instance access
- Add section explaining how to configure ~/.ssh/config with Include directive
- Show examples of direct SSH access (ssh lima-{NAME})
- Include practical usage examples (rsync)
- Document alternative Match all syntax for existing configs
- Add use cases for VSCode, Ansible, SFTP, and SSHFS
- Add note about SSHFS limitations on non-Linux platforms
Co-authored-by: AkihiroSuda <[email protected]>
For easier SSH access, you can configure your `~/.ssh/config` to automatically include Lima's SSH configurations:
65
+
66
+
```
67
+
Include ~/.lima/*/ssh.config
68
+
```
69
+
70
+
Add this line to the beginning of your `~/.ssh/config` file. If you have existing `Host` entries in your SSH config, you may need to use the following format instead:
71
+
72
+
```
73
+
Match all
74
+
Include ~/.lima/*/ssh.config
75
+
```
76
+
77
+
After adding this configuration, you can connect to Lima instances directly:
78
+
79
+
```bash
80
+
# Connect to the default instance
81
+
ssh lima-default
82
+
83
+
# Connect to a named instance
84
+
ssh lima-ubuntu
85
+
86
+
# Use SSH with other tools
87
+
rsync -a -e ssh . lima-default:/tmp/repo
88
+
```
89
+
90
+
This SSH integration also enables Lima instances to work seamlessly with various tools:
91
+
92
+
-**VSCode**: Use the Remote-SSH extension to connect to `lima-{NAME}`
93
+
-**Ansible**: Target Lima instances using their SSH hostnames in inventory files
94
+
-**SFTP**: Transfer files using `sftp lima-{NAME}`
95
+
-**SSHFS**: Mount remote filesystems with `sshfs lima-{NAME}: /local/mountpoint`
96
+
97
+
> **Note**: SSHFS may have limitations on non-Linux platforms like macOS and Windows.
98
+
62
99
### Shell completion
63
100
- To enable bash completion, add `source <(limactl completion bash)` to `~/.bash_profile`.
64
101
- To enable zsh completion, see `limactl completion zsh --help`
0 commit comments