lima icon indicating copy to clipboard operation
lima copied to clipboard

Document usage of ~/.lima/NAME/ssh.config

Open nirs opened this issue 7 months ago • 3 comments

Description

Users should add this to their ~/.ssh/config:

Include ~/.lima/*/ssh.config

To be able to connect to the lima instances with the ssh command:

ssh lima-{NAME}

See more useful examples in https://github.com/lima-vm/lima/issues/3613#issuecomment-2949736880

We mention ssh.config here: https://lima-vm.io/docs/usage/

nirs avatar Jun 06 '25 16:06 nirs

Another example:

rsync -a -e ssh . lima-default:/tmp/repo

jandubois avatar Jun 06 '25 16:06 jandubois

Depending on the rest of your ssh config, you might have to include:

Match all
Include ~/.lima/*/ssh.config

i.e. if you had already some Host entries in the file, since before...

afbjorklund avatar Jun 06 '25 16:06 afbjorklund

Other scenarios, for the lima documentation:

  • https://github.com/lima-vm/lima/discussions/1890 - VSCode
  • https://github.com/lima-vm/lima/discussions/3605 - Ansible
  • sftp sftp://lima-almalinux-10 (from issue 852) - EDIT: maybe not filezilla: https://trac.filezilla-project.org/ticket/8450
  • sshfs lima-almalinux-10: /tmp/alma - Note: sshfs has some issues on non-Linux platforms, like macOS or Windows

afbjorklund avatar Jun 06 '25 17:06 afbjorklund