Quick Introduction
WP.pro allows secure server connections via Secure Shell (SSH), providing terminal access and forming the basis for secure data transfer between popular FTP programs and WP.pro servers.
SSH offers secure access to the WP.pro server without needing a password, using an SSH key instead. Within WP.pro, passwords are deemed insecure and are not used for server access. Don’t worry, we’ll simplify the process for you.
Step 1 - Generating SSH Key Pairs
Windows (PowerShell)
Open PowerShell by pressing Win + X and selecting Windows PowerShell from the menu. To create an SSH key pair, type
ssh-keygen -t ecdsa -b 521
and follow the on-screen instructions, pressing Enter for the default paths and options (do not set a passphrase).
To display the public key, type
notepad C:\Users\WINUSER/.ssh/id_ecdsa.pub
Highlight the displayed key and copy it using Ctrl + C.
Mac / Linux
Open the terminal by pressing Cmd + Space, typing Terminal, and pressing Enter (or press Ctrl+Alt+T on Linux). To create an SSH key pair, type
ssh-keygen -t ecdsa -b 521
and follow the on-screen instructions, pressing Enter for the default paths and options (do not set a passphrase).
To display the public key, type
cat ~/.ssh/id_ecdsa.pub
Highlight the displayed key and copy it using Cmd + C.
Step 2 - Adding the Public Key to Your Site
After generating your SSH key pair, add your public key to your site’s secure keys for password-free authentication.
Log in to the WP.pro Console.
In the left navigation, click on Security.
In the WP.pro box, go to Secure Access (SSH) Keys and click the Edit button.
On the SSH keys page, click the Add + button.
Paste the previously created SSH public key into the input field and save it.
Step 3 - Configure your Client App
Of course - first of all you need user username, a hostname to connect to and perhaps a root folder that your app might require. You can get those information on the WP.pro Console via the Dashboard view of your site under File & Terminal Access.
Option A - Using a SFTP compatible File Transfer App
Open the file transfer app of your choice,
Add new server
Fill in your username and hostname
Select protocol SFTP (if applicable)
Select authentication method "Public key" (if applicable)
Select your Private Key (as created above:
C:\Users\WINUSER/.ssh/id_ecdsa
on windows, or~/.ssh/id_ecdsa
on Linux/Mac)Click to the connect button
Option B - Using SSH/SCP on a Terminal
Example - List the webroots folder
ssh -i ~/.ssh/id_ecdsa #username#@#unique-host-id#.wp.pro "ls -al webroot/*"
Example - Connect to the server via SSH
ssh -i ~/.ssh/id_ecdsa #username#@#unique-host-id#.wp.pro
Example - Using SCP
You can also use the scp
command to transfer files/folders to and from the server with a blink of an eye. LinuxBlog.io created a wonderful example page on how to use scp. Please make sure that you're using scp in conjunction with -i ~/.ssh/id_ecdsa
as well.