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

sheldonscott's avatar

Having SSH Problems? Yes. Yes, I am.

I have a site setup through Forge that runs on a DigitalOcean server. Everything is 'Active' and 'Successful'—all green lights.

However, whenever I try to deploy through GitHub I am getting a server alert:

Something went wrong when we tried to execute an action on your server. Sometimes this means we couldn't SSH into the server, or something may have gone wrong while executing a command. If error output is available, please review it below.

Having SSH Problems?

Please make sure that the following SSH key is placed in both the /home/forge/.ssh/authorized_keys file and the /root/.ssh/authorized_keys file on your server.

Being that I haven't mucked about with DO ever in my life, I am struggling to figure out where the /home/forge/.ssh/authorized_keys and /root/.ssh/authorized_keys files would be located on the server? No amount of Googling and praying to the internet gods to have mercy on my pathetic soul has resulted in any amount of success.

Do I find them through the site interface? (And, if so, where?) Do I access them via SSH? (And, if so, where?)

Thanks in advance for your wisdom.

0 likes
7 replies
ejdelmonico's avatar

A Forge DO server has access with password turned off and you need to use the SSH key you uploaded from your machine to SSH into the box.

https://cl.ly/mPTu

sheldonscott's avatar

I decided to delete the server through Forge and start over. Here's where I'm at now:

  1. I spun up a new server via Forge. It's showing as 'Active' with a 'Successful' connection.
  2. I created a new site under the server (using 'default', as I've read a lot of problems occur if you deviate from this).
  3. I synced up with my GitHub repo. A check of Settings > SSH and GPG Keys shows that the server key has been successfully added.
  4. I can manually deploy my project (or have it done via Quick Deploy)
  5. I can visit the ip address that was assigned, no problems.

However, when I try to login to my app, it's telling me that the table does not exist. I've updated my SequelPro connection details to reflect the new host, username and password, but trying to connect through there tells me:

SSH connection failed!

The SSH Tunnel was unable to connect to host [ip address], or the request timed out.

Be sure that the address is correct and that you have the necessary privileges, or try increasing the connection timeout (currently 10 seconds).

Seeing as the ip address is correct, and Forge established the privileges, how do I resolve this issue?

ejdelmonico's avatar
Level 53

@sheldonscott Did you look at my previous post? First, if you plan on using SSL, you will need to trash the default site and create a new one. It's easy so no worries. If not, then the default site is fine.

You need to upload your public key to Forge so you can SSH into the server. After, you do that and from the terminal, ssh [email protected] (whatever your IP address is).forge` is the user.

1 like
sheldonscott's avatar

@ejdelmonico - Thanks for the quick reply.

I have my public key in Forge under Server Details > SSH Keys > Active Keys. That said, I grabbed the id_rsa.pub key but SequelPro's SSH Key link is to just id_rsa - no .pub - does this make a difference? Should they be the same?

Trying to SSH in, I get:

ssh: connect to host [ip address] port 22: Network is unreachable

sheldonscott's avatar

I am wondering if the order in which you fire things up in Forge might have an impact?

I found an article that listed the events as:

  1. Create a Forge account
  2. Link to Github
  3. Add SSH keys
  4. Create server

If I am trying to add the SSH keys after creating the server, perhaps this is the problem?

I'll try starting over again in the aforementioned order when I get home.

sheldonscott's avatar

Okay. Well, it's solved.

The problem had to do with the fact that one number in my ip address was wrong (go figure), even though I had copied and pasted.

I'm going to mark @ejdelmonico's response as the solution, as that was ultimately what narrowed my focus.

ejdelmonico's avatar

@sheldonscott The order should not matter. I have many sites running on Forge and Envoyer and I sometimes create things as needed. Forge will store your public key and have it ready for you when the new server is provisioned. Otherwise, just add it before you try to SSH into the provisioned server.

When you add a Github or other repo to the site, Forge gets a key from the provider with your info (automated). Security updates for the important stuff is done automatically with a Forge server. If you want to bring everything up to date before deploying to production, Just sudo apt update && sudo apt upgrade -y. Make sure you do not replace any config files when an upgrade prompts you...just select to keep the original one and everything will work fine. Composer will check for updates on its own as well.

Any other questions, just ask.

Please or to participate in this conversation.