How to SSH to your Laravel Forge server

You cannot directly just SSH to your Laravel Forge server. You first have to save your public key to their panel.

https://forge.besnappy.com/laravel-forge

By default, Forge created servers do not allow SSH access via passwords. You must add an SSH key to the server via the server control panel or your account profile. It is strongly recommended that your local SSH keys also be protected with a strong password. To generate a new key, issue the following command on your terminal:

ssh-keygen -t rsa -C "[email protected]"

To generate a key on Windows, you should install Git and generate the SSH key from the “Git Bash” terminal.

Once the key has been generated, add the public key to Forge via the SSH Keys tab of the server management page. The public key filename will contain the “.pub” suffix.

After adding the key, you can use the following command to connect to your servers:

ssh forge@your-ip-address -i ~/.ssh/your-key

Then login to Forge and navigate to Servers / SSH Keys:

https://forge.laravel.com/auth/login

Share this article

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top