How to download Craft CMS logs using SSH and Terminal
![Oscar de la Hera Gomez](https://www.delasign.com/CDN/headshots/profile.webp)
![Two flowers representing Craft CMS and Terminal. Beneath them sits the text "Download Logs on a Hosted Craft CMS."<br />](https://www.delasign.com/CDN/images/How-to-download-Craft-CMS-logs-using-SSH-and-Terminal.webp)
A step by step guide on downloading logs from a Craft CMS hosted on Fortrabbit using SSH and Terminal.
Step One: SSH into the server
![A screenshot of Terminal showing what the terminal looks like after you have successfully accessed a hosted craft cms using SSH on Fortrabbit.](https://www.delasign.com/CDN/images/Youre-In.webp)
Follow the tutorial below to learn how to SSH into the server.
Step Two: Determine the Logs you want to Download
![A screenshot of Terminal showing the logs that are available when running the command found below.](https://www.delasign.com/CDN/images/Location_2023-07-31-132309_sudq.webp)
Set the current directory to storage/logs and run the ls command to list the logs that are available.
cd storage/logs; ls
Take a note of the the name of the log file that you wish to download.
Step Three: Download the File
![A screenshot of Terminal showing how it asks for your password after you attempt to download a file using the command below.](https://www.delasign.com/CDN/images/Download.webp)
Open a new terminal window and type in a command similar to the one below.
Replace username@host with the username@host that you used to SSH into your server in Step One and path/on/your/computer is the path where you wish the file to be downloaded to.
scp username@host:storage/logs/log.file path/on/your/computer
You will be prompted to enter a password, use the same one that you used to SSH in.
After you enter your password, the terminal will transition to a visual similar to that below which will inform you of the progress made as you download the file.
![A screenshot of Terminal showing you what Terminal looks like when a file is being downloaded.](https://www.delasign.com/CDN/images/Downloading.webp)