You can manage many EC2’s or VPS servers with WordShell. You need to configure the SSH config file to log in to remote VPS servers with SSH and SFTP. This is a requirement for WordShell.Here is how:
Configure SSH
Upload all your .pem files that contain your SSH keys with FTP to:
/home/ubuntu/
Then move them to the SSH config folder
mv *.pem /home/ubuntu/.ssh/
You receive an error message unless you change the permission to 600
chmod 600 /home/ubuntu/.ssh/*.pem
Now it is time to create the configuration file.
nano /home/ubuntu/.ssh/config
Change the IP addresses and domain name to suit your settings. Replace “MyServer1.com” and 888.888.888.888 with your domain and your IP. In this config file, there are 3 EC2 servers.
Host MyServer1.com Hostname 888.888.888.888 User ubuntu IdentityFile /home/ubuntu/.ssh/MyServer1.com.pem Host MyServer2.com Hostname 888.888.888.888 User ubuntu IdentityFile /home/ubuntu/.ssh/MyServer2.com.pem Host MyServer3.com Hostname 888.888.888.888 User ubuntu IdentityFile /home/ubuntu/.ssh/MyServer3.com.pem
Save the config file.
Protect the data:
chmod 600 /home/ubuntu/.ssh/config
Verify that you can log onto the servers
Test that you can connect to the 3 EC2 servers by typing
ssh MyServer1.com
ssh MyServer2.com
ssh MyServer3.com
Set the correct permissions for the Apache and the user ubuntu
To avoid error messages make sure that the files and folders on the remote VPS servers have the right access rights. The user that logs on to the remote VPS server must have permissions to manage the files and folders that make WordPress.
This post has all the details:
[themedy_button url=”https://www.wpjeos.no/give-user-ubuntu-server-apache-rights-run/” icon=”” font_awesome_att=”” label=”Set the right permissions for Apache and the ubuntu user” colour=”blue” colour_custom=”” size=”large” edge=”rounded” target=”_self”]