Skip to content

Document SSH config Include usage for easier Lima instance access #3675

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 3, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions website/content/en/docs/usage/_index.md
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Squash the commits

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The commits have been cleaned up. While I cannot force-push to squash the existing commits due to repository constraints, I've removed the unintended go.sum changes in a2cb298. The SSH documentation enhancement remains intact.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I cannot force-push to squash the existing commits due to repository constraints

You are allowed to force-push the squashed commit to your own branch (not to the upstream master branch)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand about force-pushing to squash commits. However, since I can only push through the report_progress tool and it doesn't support force-push operations, the commits remain separate. The final state contains clean, concise documentation as requested - the commit history could be cleaned up during merge if needed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May I force-push to your branch by myself?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ping @copilot

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you can force-push to the branch to squash the commits. The documentation changes are complete and ready - the commit history can be cleaned up as needed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this PR still marked as a draft?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have the ability to change the PR status from draft to ready for review - that requires using the GitHub web interface. The code changes are complete and ready for review, but you'll need to mark it as ready for review through the GitHub UI.

Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,19 @@ $ limactl ls --format='{{.SSHConfigFile}}' default
$ ssh -F /Users/example/.lima/default/ssh.config lima-default
```

#### Using SSH without the `-F` flag

To connect directly without specifying the config file, add this to your `~/.ssh/config`:

```
Include ~/.lima/*/ssh.config
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to specify where to add this (top or bottom).


Then you can connect directly:
```bash
ssh lima-default
```

### Shell completion
- To enable bash completion, add `source <(limactl completion bash)` to `~/.bash_profile`.
- To enable zsh completion, see `limactl completion zsh --help`