SSH access
Updated
Reviewed
🔑
Secure shell access.
Connect to your fortrabbit app's remote environment via SSH for secure command-line access to execute PHP scripts, run Composer, and manage your code.
Get ready
- You need to have setup SSH keys to authenticate.
- See the direct code access intro for use cases and limits.
Accessing SSH
Each environment has its own SSH access. Execute the following in your terminal to login:
# Connect to your environment via SSH
$ ssh {{app-env-id}}@ssh.{{region}}.frbit.app
If the login went well, you will see a small welcome message:
––––––––––––––––––––––– ∙ƒ –––––––––––––––––––––––
Executing scripts
Scripts with the executable bit and a shebang line run directly. A PHP file without the executable bit runs through the PHP interpreter:
$ php artisan some:command
$ php some-script.php
$ vendor/bin/drush status
Some Composer binaries, vendor/bin/drush among them, are shell scripts. Call them directly: php vendor/bin/drush prints the script instead of running it.
Using Composer
Using Git deployment will trigger Composer automatically. Therefore, it should not be necessary to run Composer from the environment. If you still need to run Composer manually on the app, avoid using composer update, as that will bring your local code out of sync and likely cause issues. Use composer install instead. Running Composer directly on the app is generally not necessary.
Limitations
- This is not a root shell, so you can't install or remove software packages
- Mind that you are using the same runtime as your web application: resource intensive operations will drain memory and CPU from the web execution
- Worker and cron jobs are managed via the dashboard, not the shell