How to Connect to Easy PHP Hosting over SSH in a Mac/Linux Terminal

For configuring some types of apps in our Easy PHP hosting, it is convenient to use an SSH connection to execute commands on the server. This guide walks through connecting to Porkbun's Easy PHP hosting using SSH from a Mac or Linux terminal.

Note: SSH connections to Easy PHP hosting do not provide root access. To enable SSH access, your account email address and phone number must both be verified.

1
Log in. You should arrive at the Domain Management screen. If you're already logged in, click the ACCOUNT button in the top-right corner and select Domain Management.

The Account button with a dropdown menu open featuring the Domain Management option.

2
From the Domain Management page, click the Easy PHP column for the domain you want to use from the Website column.

A list of domains with an arrow pointing the Easy PHP hosting button.

3
From the Easy PHP page for your domain, scroll down the SSH/SFTP section and click the 'request SSH access' button.

An arrow pointing to the 'request SSH access' button in a section for SSH and SFTP settings.

After a few moments of processing, you should see 'SSH Access: enabled' appear' in the SSH/SFTP section.

An arrow pointing to the 'SSH Access: enabled' line in a section for SSH and SFTP settings.

4
From the same SSH/SFTP section, click the 'generate keys' button.

An arrow pointing to the 'generate keys' button in a section for SSH and SFTP settings.

Then click the 'OK' button in the dialog window that opens.

An arrow pointing to the 'OK' button in a dialog box.

Once the key is generated, which usually takes just a few seconds, click the 'Download Private Key' button and note where the file gets saved.

An arrow pointing to the 'Download Private Key' button in a dialog box.

After the file has been downloaded, clock the 'Close' button.

5
Open a terminal window. Once that is open, the first thing we'll need to do is set the correct permissions for the .pem file using the following command, replacing 'PathToFile' with the path to the directory your .pem file is saved in, 'Downloads' by default, and replacing 'publickey.pem' with the filename of your .pem file.
chmod 400 PathToFile/publickey.pem
6
With those permissions set, we can now connect to the server using the following command
ssh -i PathToFile/publickey.pem domainname@sftp.domainname -p 9022

As with the previous steps, replace 'PathToFile' with the path to the directory your .pem file is located in and 'publickey.pem' with your .pem filename. You'll also replace each instance of 'domainname' with your full domain name. e.g. goosehollow.design. A full example of this for goosehollow.design looks like:

ssh -i Downloads/54267.db5e3a933dcdcb3c8ef3ca6f2f29874c7dcb5e6f3d5f1de7a4ab21a71dac4417.keys-goosehollow.design.pem goosehollow.design@sftp.goosehollow.design -p 9022

The first time you connect, you will need to approve the fingerprint for the connection by typing in 'yes' when prompted.

A terminal window showing a message about trusting the .pem file with a response of 'yes' entered.

That's it! You should now be connected and see your domain name in the terminal prompt along with your IP address.

A screenshot of a terminal window showing the domain name in the terminal prompt.
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.