≡ Menu

Easy

How to map static IP address using dnsmasq under LXD (Linux containers)

I am using LXD (Linux container) to host Apache, MySQL, Perl and PHP-based app. I would like to assign or map fixed IP address to my MySQL container. How do I allow dnsmasq DHCP server to assign a static IP address to LXD container based on name or MAC address?
[click to continue…]

{ 0 comments }

How to log real user’s IP address with Nginx in log files

My nginx server is behind a reverse proxy load balancer. How can I show the correct client IP address in nginx log files when nginx is behind a load balancer?
[click to continue…]

{ 0 comments }

How to create a new sudo user on Ubuntu Linux server

I am a new Ubuntu Linux 16.04.xx LTS server user. How do I create a new sudo user on my server? How do I add a new user as sudoer file using the command line option on Ubuntu?
[click to continue…]

{ 1 comment }

Error while loading shared libraries: libXrender.so.1 on Linux

I am trying to use wkhtmltopdf command to create and convert html pages to a pdf. However, I am running into errors though as follows when try to use wkhtmltopdf via a shell or Python script:
     Creating foo.pdf …
     ~/bin/wkhtmltox/bin/wkhtmltopdf: error while loading shared libraries: libXrender.so.1: cannot open shared object file: No such file or directory
     Error: foo.pdf not found.

How do I fix this problem with out installing the xserver on my Ubuntu or Debian server?
[click to continue…]

{ 1 comment }

I configured and use my openssh server to accept only public key based authentication. I need to test if my server accepting password. How to allow ssh client to use only password auth when pubkey auth configured?
[click to continue…]

{ 0 comments }

How to copy a single file to multiple directories in Linux or Unix

If I want to copy a single file into three locations (directories), by using a single cp command (e.g. cp file /dir1/ /dir2/ /dir3/. Would that be possible? If yes, please provide the command for GNU/Linux or Unix operating systems.
[click to continue…]

{ 5 comments }

How to fix: MacOS keep asking passphrase for ssh key after upgrade or reboots

I recently upgraded my MacOS Sierra and now ssh command keep asking for passphrase as follows when I try to login to my remote Linux/Unix server:
      Enter passphrase for key ‘/Users/vivek/.ssh/id_ed25519’:
How do I fix MacOS Sierra upgrade that keep breaking ssh keys in terminal?
[click to continue…]

{ 0 comments }