Need help with nearbt?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

128 Stars 8 Forks Other 102 Commits 0 Opened issues


Authenticate on OS X with iPhone Bluetooth LE.

Services available


Need anything else?

Contributors list

No Data


A pluggable authentication module (PAM) on OS X for local authentication with iOS devices (NearBT installed) via Bluetooth LE.

With NearBT, you can,

  • Unlock OS X screen saver without typing password (just type return). No need to store your password.
  • Add an extra authentication to log in OS X in addition to password. It works like two-factor authentication.
  • Also works on authentication dialogs when you make changes on some preferences, and
    command in Terminal.



  • OS X passwords are not saved somewhere regardless of whether passwords are encrypted.
  • iOS device identifiers are used in Bluetooth connections.
  • Bluetooth pairing is required.
  • Time-based One-time Password Algorithm (TOTP) is used to authenticate.
  • Open source for both OS X and iOS.


  • Only create a connection when an authentication starts. Stop the connection once the authentication finishes.
  • Thanks to Bluetooth Low Energy, it's about 1% in 7 days from iOS's battery usage report.


  • Minimum RSSI (received signal strength indicator). Higher values reduce the valid scope of iOS devices.
  • Run scripts when authentication begins or if authentication succeeds or fails.


pam_nearbt-setup parameters
for more details.


  • OS X (>= 10.10)
  • iOS (>= 9)

  • MacBook (>= 2015)
  • MacBook Air (>= 2011)
  • MacBook Pro (>= 2012)
  • Mac Mini (>= 2011)
  • Mac Pro (>= 2013)
  • iMac (>= 2012)

  • iPhone (>= 4S)
  • iPad (>= 4th gen)
  • iPad mini
  • iPad Air
  • iPod Touch (>= 5th gen)

It contains,

  • An iOS app --
  • A pluggable authentication module (PAM) on OS X --
  • A command line setup tool --


Know how to uninstall it before installation.

  1. Remove related configuration lines in /etc/pam.d/ before uninstallation.

  2. Remove installed files.

    sudo rm /usr/local/lib/security/
    sudo rm /usr/local/bin/pam_nearbt-setup
  3. If you want to remove all configuration files,

    rm ~/.config/pam_nearbt/peripheral
    rm ~/.config/pam_nearbt/secret
    sudo rm /usr/local/etc/pam_nearbt/peripheral
    sudo rm /usr/local/etc/pam_nearbt/secret
    If you have set other secret path in the PAM's parameters, remember to remove it.


  • Download and pam_nearbt-signed-version.pkg from latest release
  • Extract and open
    in Xcode, build and run NearBT on your iOS devices.
  • Open
    and complete the installation.
  • Open Terminal, run
    and follow the instructions.
  • For available PAM parameters, run
    pam_nearbt-setup parameters


iOS and OS X


We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.