-
Notifications
You must be signed in to change notification settings - Fork 608
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
Stuck on "Waiting for the essential requirement 1 of 5: "ssh"; Permission denied (publickey) #974
Comments
The logs might have more info |
This comment was marked as outdated.
This comment was marked as outdated.
Any update on this?? |
There might be more details in the sshd log, why it is rejecting the key. You can also run ssh with some more |
This is the error which I keep getting. Initially I thought it might be coz the ssh key has a passphrase but even after I removed it the issue persists.
|
Any update?? |
Same issue here on my M1, may I ask if you've solved it yet? |
Same issue here, problem with permissions for public key. Cleaning |
There should be some logs in The pubkey itself should be in ~/.ssh/authorized_keys |
I assume this should be done inside VM. How can I get in to run this?
On host or in VM? |
Both the logs and the ssh files are in the VM*, since ssh seems to be broken you probably have to use the console. * The host/client uses ~/.lima/_config/user.pub or something similar (under $LIMA_HOME) for storing the public key |
Hmm, authenticating might be an issue. I think the boot will dump you at a login prompt on the console. So not sure you will be able to get at the logs by using the |
@afbjorklund here's the line from
As you can see, it lists identities both from |
You can disable the adding of your regular keys. It is probably going to be the default soon. ssh:
# Load ~/.ssh/*.pub in addition to $LIMA_HOME/_config/user.pub .
# This option is useful when you want to use other SSH-based
# applications such as rsync with the Lima instance.
# If you have an insecure key under ~/.ssh, do not use this option.
# 🟢 Builtin default: true
loadDotSSHPubKeys: null The comment (about usefulness) is mostly obsolete, now that there is |
The curious part is what happens on the server, if there is anything in serial.log or sshd log... Booting single user is "hard", probably should be documented under the internal/developers Currently you have to set up some special files, and then qemu will pick those up during boot. kernel:
Not something that you would normally have to resort to, but only for debugging/resolving this. anders@lima-default:/home/anders$ sudo cp /boot/vmlinuz /tmp/lima/kernel
anders@lima-default:/home/anders$ sudo cp /boot/initrd.img /tmp/lima/initrd
anders@lima-default:/home/anders$ cat /proc/cmdline > /tmp/lima/kernel.cmdline
You are in rescue mode. After logging in, type "journalctl -xb" to view
system logs, "systemctl reboot" to reboot, "systemctl default" or "exit"
to boot into default mode.
Press Enter for maintenance
(or press Control-D to continue):
root@lima-default:~# |
I'll be glad to debug and help. But regarding to (co)lima I'm just a user who wants his images to run. If there's somewhat meaningful description exists then I'll try to follow it. Please note that I'm using macOS on M1. |
That is OK, and not expected. Do you get the regular output from cloud-init (in serial.log), where it prints out the authorized keys and the host keys?
(they all start with There should also be the regular systemd output for the service itself.
But we can't really see the login happening from the "outside". It requires something like |
Here's something suspicious I see in
|
Oh, you can't use the name "admin". We should probably look for some names... Like "bobby tables": https://xkcd.com/327/ Or for the error from cloud-init, where it tries to add an existing groupname (this one is reserved by the Ubuntu OS) By default each new user will create a group with the same name, so it can't use any of the existing groups (or users) The same reason for the original: "shadow"
But there should have been a warning:
|
Bummer. Looks like it explains everything. |
@afbjorklund case is closed for me, thanks a lot. |
For the history, here's my solution to a problem: Create new user on behalf of whom '[co]lima` will work: # Create new user and put its home dir under /var
sudo sysadminctl -addUser lima -fullName "Lima Colima" -password procedure -admin
# Hide user's home
dscl . create /Users/lima IsHidden 1
# Create alternative user's home under /var
sudo dscl . -create /Users/lima NFSHomeDirectory /var/lima
mv /Users/lima /var/lima From this point it's possible to run [co]lima after |
In the future it should be possible to choose a different name. |
Description
I'm trying to start lima with default settings using
limactl start
and with default settings but I'm stuck on this error.limactl version
0.11.2
colima version
0.4.4
QEMU emulator version
7.0.0
System:
MacOS v12.4 M1
I have already gone through other related issues (#525, #17, #745, #767, #745, #713, #503, #543) but still no luck. I even tried it with some other versions of ubuntu but all show the same error. But ya fedora works fine.
The text was updated successfully, but these errors were encountered: