Navigation

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Creating a SSH key for the Asterisk user in FreePBX

    FreePBX Guides, Hints, and Tricks
    ssh git freepbx ssh key
    1
    1
    1407
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Jared Busch
      Jared Busch last edited by

      When we setup FreePBX, clients will often elect not to purchase the Endpoint Manager (EPM) commercial module.

      They do this because once the physical phones are setup, they almost never make changes often that require learning how to use and maintain the endpoints via EPM.

      EPM is a solid product for a very reasonable cost. But like all things, the cost must be weighed against the benefit.

      For customers that do not use EPM, we setup a private git repository to easily maintain things. To automate that, the PBX needs to use key based SSH.

      Everything FreePBX does is owned by the user asterisk so you need to create a keypair under that user.

      1. Log in to your PBX console via ssh as yourself.
        ssh pbx.domain.com or ssh [email protected]

      2. Switch to the asterisk user.
        sudo su asterisk

      3. Create the ssh keypair using modern strong methods.
        ssh-keygen -o -t ed25519 -C "FreePBX Asterisk User"

      4. It will ask what directory, to store the key, press enter.
        The default is what you want: /home/asterisk/.ssh

      5. It will ask for a passphrase, do not enter anything. This is for automation, there will be no user to enter the passphrase every time the key is used.

      6. It will ask to confirm the passphrase, press enter again.

      7. It will then display the key fingerprint and ascii art.
        1f545f62-a660-40b8-8ac2-5619220a9dce-image.png

      1 Reply Last reply Reply Quote
      • First post
        Last post