Plesk Is Counterintuitive

First of all, this is a mini-rant.

Thank you, WordPress for your very informative and helpful guide on how to install your CMS: http://codex.wordpress.org/Installing_WordPress.

Just when I thought that everything’s going smooth…

*enter Plesk*

What the fuck is Plesk? Just google it for unbiased description, BTW.

Basically, Plesk is a web-based control panel for shared and VPS hosting. In a nutshell, instead of FTP-ing and ssh-ing, a normal human being can just click and manage a hosted system.

I was asked by my boss to use it. Apparently, our client uses it so… there’s that. It’s supposed to make my life EASIER but it never did.  My life has been a living hell so far.

I am talking about this certain WP site that I’m trying to deploy from my staging server that uses Amazon EC2. It’s supposed to be a 2-hour deployment but because of limited access and Plesk’s futility, it has become a nightmare experience for me.

Maybe it’s just the limited access that’s making me crazy but damn it. Plesk is a frustrating piece of shit. If your time is precious and you have a deadline to meet, don’t fucking use it.

Oh before I forget, Plesk has a 1-click install for WP but it’s an add-on thing. Uhm, go purchase? LOL

My FB Like Button Issue

So I’ve been dealing with Facebook’s like button error for a while. FB offers an easy way of putting a Like button in your WordPress theme by using a configurator which will give you codes once you input some needed info. I got it from here https://developers.facebook.com/docs/reference/plugins/like/ and I thought I just messed up some codes because when I click the button, it gives me this error:

“Sorry, this post contains a suspicious URL: Unknown error”.

Upon doing some checks I got it all sorted out. Ugh.

By default ec2 gives a public DNS something like ec2-x-x-x-x.us-west-2.compute.amazonaws.com and Facebook treats it as a suspicious URL.Well, of course it does look suspicious. Look how long the URL is.

I tried other “valid” URLs and they worked.

Stupid me.

Generated SSH keys in Windows To Use In Linux

So generated my public and private key pair in Windows but I have to use my keys in my Linux, specifically Ubuntu, to ssh from there.

How do I do that? I have my private and public keys with me.

So I know that I have to put ’em in the ~/.ssh/authorized_keys but authorized_keys dir does not exist and I am not sure if I should just literally copy the keys there. I thought SSH is for security so it probably won’t be that straightforward.

By the combined power of Google, Reddit and StackOverflow, I solved this mess!

In my Linux machine:

mkdir ~/.ssh || true chmod 700 ~/.ssh

touch ~/.ssh/authorized_keys

In my Windows machine: 

1. Using PuttyGen, click Load and load existing private key

2. Conversions->Export OpenSSH and export your private key

3. Copy private key to ~/.ssh/id_rsa

Back to my Linux machine: 

4. Create the RFC 4716 version of the public key using ssh-keygen

ssh-keygen -e -f ~/.ssh/id_rsa > ~/.ssh/id_rsa_com.pub

After #4, I encountered an error that says:

WARNING: UNPROTECTED PRIVATE KEY FILE!

Permissions 0744 for ‘/home/katpadi/.ssh/id_rsa’ are too open. It is recommended that your private key files are NOT accessible by others. This private key will be ignored. bad permissions: ignore key: /home/katpadi/.ssh/id_rsa

To fix: I reset the permissions by doing:

sudo chmod 600 ~/.ssh/id_rsa

5. The last step is to  convert the RFC 4716 version of the public key to the OpenSSH format:

ssh-keygen -i -f ~/.ssh/id_rsa_com.pub > ~/.ssh/id_rsa.pub

Hooray!

I can now ssh -l katpadi somethingsomething.blah.com happily ever after in my Linux machine.

Mamba, out!