AWS Lightsail WordPress – connect to database on instance using mysqli

//Params to connect to a database $dbHost = “*static ip of wordpress site*”; This should be $dbHost = “localhost”; instead, or “127.0.0.1” (or even “::1”). localhost uses a separate virtual network interface that makes sure traffic between services on your Linux VM doesn’t leave the VM In general it’s safer to use localhost rather than … Read more

Is it possible to use rsync over sftp (without an ssh shell)?

Unfortunately not directly. rsync requires a clean link with a shell that will allow it to start the remote copy of rsync, when run this way. If you have some way of running long-lived listening processes on the host you could try starting rsync manually listening for connections on a non-privileged port, but most techniques … Read more

Ansible stuck on gathering facts

I was having a similar issue with Ansible ping on Vagrant, it just suddenly stuck for no reason and has previously worked absolutely fine. Unlike any other issue like ssh or connective issue, it just forever die with no timeout. One thing I did to resolve this issue is to clean ~/.ansible directory and it … Read more

Why Block Port 22 Outbound?

I don’t see that anyone has spelled out the specific risk with SSH port forwarding in detail. If you are inside a firewall and have outbound SSH access to a machine on the public internet, you can SSH to that public system and in the process create a tunnel so that people on the public … Read more

bad ownership or modes for chroot directory component

From the man page: ChrootDirectory Specifies the pathname of a directory to chroot(2) to after authentication. All components of the pathname must be root-owned directories that are not writable by any other user or group. After the chroot, sshd(8) changes the working directory to the user’s home directory. My guess is one or more of … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)