Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

marcw's avatar
Level 2

Can't provision server on local Ubuntu 24.04 machine with Laravel Forge

Hi everyone,

I'm having trouble provisioning a server on my local network using Laravel Forge. I'm running Ubuntu 24.04 on the machine.

Here's what's happening:

The provisioning process stops when Forge tries to test the server connection using [email protected] I have port forwarding set up correctly on my router. I can SSH into the server using the public IP address without any issues. However, Forge seems unable to connect. Has anyone else encountered this problem? Any suggestions on how to troubleshoot this would be greatly appreciated.

Thanks!


info: Füge Benutzer »forge« der Gruppe »sudo« hinzu … 

 Checking the Forge connection ... 

 Error "400" while checking the Forge connection. 

 Forge: 000ERROR WHEN CONNECTING AS "forge" USER: 



 [email protected]: Permission denied (publickey,password,keyboard-interactive).

0 likes
1 reply
LaryAI's avatar
Level 58

It looks like you're encountering an issue with Laravel Forge not being able to connect to your server due to SSH authentication problems. Here are some steps you can take to troubleshoot and resolve this issue:

  1. Check SSH Key Configuration: Ensure that the SSH key Forge is using is correctly set up on your server. Forge typically uses SSH keys for authentication, so you need to make sure the public key is added to the ~/.ssh/authorized_keys file for the forge user on your server.

    • First, verify that the SSH key Forge is using is present in your Forge account settings.
    • Then, log into your server manually using SSH and check the authorized_keys file:
    ssh [email protected]
    cat ~/.ssh/authorized_keys
    

    Ensure that the public key from Forge is listed there.

  2. Permissions on SSH Directory: Check the permissions of the .ssh directory and the authorized_keys file. They should be set to the following:

    chmod 700 ~/.ssh
    chmod 600 ~/.ssh/authorized_keys
    
  3. Firewall and Port Forwarding: Double-check your firewall settings and port forwarding configuration. Ensure that port 22 (the default SSH port) is open and correctly forwarded to your server.

  4. SSH Configuration: Make sure there are no restrictions in your SSH configuration file (/etc/ssh/sshd_config) that might prevent the forge user from logging in. Look for settings like AllowUsers or DenyUsers and ensure they are not blocking the forge user.

  5. Re-add the Server in Forge: Sometimes, removing the server from Forge and re-adding it can resolve connection issues. This will prompt Forge to re-attempt the connection and setup process.

  6. Check Forge Logs: If the above steps do not resolve the issue, check the logs in Laravel Forge for any additional error messages or clues.

By following these steps, you should be able to identify and resolve the issue preventing Laravel Forge from connecting to your server. If the problem persists, consider reaching out to Laravel Forge support for further assistance.

Please or to participate in this conversation.