> ## Documentation Index
> Fetch the complete documentation index at: https://docs.macstadium.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Can't log in to your Mac

> Fix SSH login problems on a MacStadium bare metal Mac: rejected keys or passwords, firewall lockouts, FileVault after a restart, and what to put in a support ticket.

Start with what your SSH client shows when you try to connect. Each symptom has a different cause and fix. Run `ssh -v <username>@<ip>` to see more detail about where the connection stops.

| What you see | Most likely cause | Go to |
| - | - | - |
| `Connection timed out` or no response | The Mac is off or stuck, a network path is blocked, or a firewall rule on the Mac blocks SSH | [The Mac doesn't answer](#the-mac-doesnt-answer) |
| `Permission denied` | Wrong username, key, or password, or password login is turned off | [SSH rejects your key or password](#ssh-rejects-your-key-or-password) |
| `REMOTE HOST IDENTIFICATION HAS CHANGED` | The Mac was reimaged or replaced | [The host key changed](#the-host-key-changed) |
| No response right after a restart, and FileVault is on | The Mac is waiting at the FileVault unlock screen | [FileVault after a restart](#filevault-after-a-restart) |

## The Mac doesn't answer

1. Check the network path from your side. See [Troubleshooting connectivity issues](https://docs.macstadium.com/iaas/iaas-faqs/troubleshooting-connectivity-issues.md).
2. If the path reaches MacStadium but the Mac doesn't respond, restart it with **Hard Reboot** in the MacStadium portal. See [Hard reboot a MacStadium Mac from the portal](https://docs.macstadium.com/iaas/iaas-faqs/reboot-your-mac.md). Wait a few minutes, then try SSH again. A Hard Reboot clears firewall (`pf`) rules you loaded with `pfctl` without saving them to disk, so try it first if a firewall rule may be blocking SSH.
3. If the Mac still doesn't answer after a Hard Reboot, and you set up firewall (`pf`) rules that load and turn on automatically at startup, a rule on the Mac may be blocking SSH. You can't undo that remotely. [Open a ticket](#open-a-ticket).

> [!TIP]
>
> Before you change firewall rules on a remote Mac, schedule a rollback so a bad rule can't lock you out: start a background job that turns `pf` off after a few minutes, load your new rules, and cancel the job once SSH still works from a second terminal.

## SSH rejects your key or password

Check these in order:

1. **The username.** Use the administrator username from [My Cloud](https://docs.macstadium.com/macstadium/macstadium-overview/ip-plan.md), not your local username. `ssh` uses your local username if you leave it out.
2. **The key.** If you have more than one key, name the one you set up on the Mac: `ssh -i ~/.ssh/<KEY_FILE> <username>@<ip>`. The `ssh -v` output lists each key it offers.
3. **The password.** If password login is still turned on, try the administrator password. My Cloud shows the password the Mac was provisioned with, which is out of date if you changed it.
4. **Too many failed passwords.** After repeated wrong passwords, macOS rejects every password for the administrator account, including the correct one, until someone logs in at the Mac's screen. You'll see `Account administrator is temporarily unavailable` or `Permission denied`. Only password logins count toward this, so key logins still work, and it can't happen at all when password login is turned off. A reboot or an admin password reset doesn't clear it, and a reset also puts the Mac out of sync with the password in My Cloud.

> [!WARNING]
>
> On a public IP, automated login attempts from the internet against the administrator account keep this block active, so waiting doesn't clear it. Use key-only login (`PasswordAuthentication no`) so failed passwords can't lock out the account. If the block is already active, [open a ticket](#open-a-ticket): it clears only when someone signs in at the Mac's screen.

If you've lost the only key that can log in and you turned off password login, you can't get back in over SSH. [Open a ticket](#open-a-ticket) and include a new public key (the `.pub` file, never the private key). A technician signs in at the Mac's screen with the administrator password and adds your key, so password login stays off. If you'd rather turn password login back on instead, say so in the ticket. Your Mac keeps running and your data isn't touched, so the only wait is for the ticket.

This needs the administrator password to still work. If you also changed that and don't have the new one, say so in the ticket: recovery then needs a password reset from macOS Recovery, which with FileVault on needs your recovery key.

If a password or key you know is correct stops working and you didn't change anything, the Mac may be compromised. See [What should I do if my Mac was compromised?](https://docs.macstadium.com/iaas/iaas-faqs/what-should-i-do-if-my-mac-was-compromised.md).

## The host key changed

After a reimage, the Mac has a new SSH host key, so your SSH client warns that the host identification changed. If you know the Mac was reimaged, remove the old key and connect again:

```bash theme={null}
ssh-keygen -R <ip>
```

If you don't know of any reimage or replacement, don't connect. [Open a ticket](#open-a-ticket) and ask MacStadium to confirm.

## FileVault after a restart

With FileVault turned on, a Mac that restarts stops at the FileVault unlock stage until someone unlocks it. This includes a Hard Reboot from the portal.

**macOS 26 Tahoe or later:** you can unlock it over SSH, if Remote Login is on. Connect with an administrator account:

```bash theme={null}
ssh <ADMIN_USERNAME>@<IP>
```

After you enter the password, the disk unlocks and the connection closes while macOS finishes starting up. Wait a minute, then connect again as usual. Unlocking this way doesn't open a shell.

The unlock always asks for a password, even if you turned off password login with `PasswordAuthentication no`. Your SSH settings are stored on the encrypted disk, so they don't apply until it's unlocked. Use the password of a local account that can unlock FileVault, such as the administrator account. Key login works again once the Mac has started up.

**macOS 15 and earlier:** SSH isn't available until someone unlocks the Mac at its screen. [Open a ticket](#open-a-ticket).

For a restart you plan, unlock ahead of time so the Mac comes back up on its own:

```bash theme={null}
sudo fdesetup authrestart
```

Keep your FileVault recovery key somewhere you can reach it without the Mac. A technician needs it to recover a Mac you can't unlock.

## Open a ticket

[Open a ticket](https://docs.macstadium.com/macstadium/support/service-desk-guide.md#open-a-ticket-for-a-specific-mac) for the Mac and include:

* The Mac's service ID or IP address
* The exact message your SSH client shows, or the `ssh -v` output
* What changed before you lost access, such as a firewall rule, SSH setting, FileVault, a restart, or a new key
* Whether FileVault is turned on
* Whether you need to keep the data on the Mac

If the problem is a forgotten administrator password rather than a lockout, see [How do I reset the admin password on my Mac?](https://docs.macstadium.com/iaas/iaas-faqs/how-do-i-reset-the-admin-password-on-my-mac.md).


## Related topics

- [Connecting to your Mac for the first time](https://docs.macstadium.com/iaas/bare-metal-macs/connecting-to-your-mac-for-the-first-time.md)
- [What should I do if my Mac was compromised?](https://docs.macstadium.com/iaas/iaas-faqs/what-should-i-do-if-my-mac-was-compromised.md)
- [MacStadium VDI troubleshooting quick reference](https://docs.macstadium.com/remote-desktop-vdi/reference/troubleshooting-quick-reference.md)
- [Add a new user to your MacStadium account](https://docs.macstadium.com/macstadium/account-management-and-saml/add-a-new-user.md)
- [Can I access the nodes on a MacStadium-hosted Orka cluster?](https://docs.macstadium.com/orka/orka-cluster-access/can-i-access-nodes-on-a-hosted-cluster.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.