Reset my Macs password? I still have SSH access

I recently changed my password and promptly forgot it :P What is the best option for resetting it? I can still access the mac via SSH (ssh key auth method), can I do anything with that?


Solution 1:

No - the typical ways to reset a password or delete the file that lets the Mac reboot to the setup assistant where it lets you create a new admin user that will have a known password all require you to know a working user/password combination that works for sudo.

You'll want to boot to the Recovery HD or install media or into single user mode to make a new admin user (which can be deleted once you've reset your password) or use the normal OSX procedure to reset your password.