SSH Key-Pair Authentication

Create Key-Pair by each user, so login with a common user on SSH Server Host and work like follows.

# create key-pair
Generating public/private rsa key pair.
Enter file in which to save the key (/home/debian/.ssh/id_rsa): # Enter or input changes if you want
Created directory '/home/debian/.ssh'.
Enter passphrase (empty for no passphrase): # set passphrase (if set no passphrase, Enter with empty)
Enter same passphrase again:
Your identification has been saved in /home/debian/.ssh/id_rsa
Your public key has been saved in /home/debian/.ssh/
The key fingerprint is:
The key's randomart image is:

debian@dlp:~$ll ~/.ssh

total 8
-rw------- 1 debian debian 2655 Aug 17 13:48 id_rsa
-rw-r--r-- 1 debian debian 574 Aug 17 13:48
debian@dlp:~$mv ~/.ssh/ ~/.ssh/authorized_keys

Transfer the private key created on the Server to a Client, then it’s possible to login with Key-Pair authentication. Below is an example to connect from a linux shell. Continue reading “SSH Key-Pair Authentication” »


Redirect all request to public/ folder in laravel 5

There are two solutions:

1. Using .htaccess with mod_rewrite

RewriteEngine on
RewriteCond %{REQUEST_URI} !^public
RewriteRule ^(.*)$ public/$1 [L]

2. You can add a index.php file containing the following code and put it under your root Laravel folder (public_html folder).

header('Location: public/');



Convert VirtualBox VM to ProxMox VE

  1. On the VirtualBox host, launch VirtualBox
  2. Right click the VM to convert > Settings
  3. Select Storage from the left navigation
  4. Click the virtual hard disk and copy the Location value for the full path of the disk to the clipboard
  5. Right click on the Start menu > Run > type cmd.exe > Press Enter
  6. Enter the following commands in the command prompt
    # change directory to VirtualBox installation
    cd %programfiles%\Oracle\VirtualBox
    # convert the .vdi to raw .img
    VBoxManage clonehd --format RAW "pasted\full\path\to.vdi" "pasted\full\path\to.raw"
  7. Once the .vdi to .raw conversion completes, open a web browser and navigate to the ProxMox web UI https://ProxMoxDNSorIP:8006/
  8. Click the Create VM button at the top right
  9. On the General tab, enter a VM Name and note the VM ID generated > click Next
  10. On the OS tab select Do not use any media and set the Guest OS > click Next
  11. On the System tab click Next
  12. On the Hard Disk tab set the Disk size to 0.001 > click Next
  13. On the CPU tab set the number of CPUs > click Next
  14. On the Memory tab set the amount of memory to allocate in MiB > click Next
  15. On the Network tab click Next
  16. On the Confirm tab review the settings and click Finish
  17. Select the newly created VM from the left navigation panel > Hardware
  18. Click the Hard Disk to select it
  19. Click the Detach button to detach the hard disk from the VM
  20. Click the Unused disk
  21. Click the Remove button to permanently delete it
  22. Download WinSCP Download
  23. Extract WinSCP and run the executable
  24. Connect to the ProxMox IP server via WinSCP
  25. Copy the VirtualBox created .raw file to a location on the ProxMox server that has enough free disk space, /root for example
  26. Back in the browser, open the ProxMox host Shell
  27. Run the following command to import the raw disk, modify the .raw file name and VM ID noted earlier
    # import the raw disk
    # usage:
    # qm importdisk <VM ID> /root/<source disk file>.raw <destination storage pool name>
    qm importdisk 100 vbox.raw HDD_500GB --format qcow2
  28. Once the disk import completes, select the target VM from the left navigation menu > Hardware
  29. Double click the Unused Disk > Click the Add button
  30. Select Options from the left navigation sub-menu
  31. Double click Boot Order
  32. Check the Enabled box next to the hard disk
  33. Drag the Hard disk up in the boot order as needed, typically below the CD-ROM device
  34. Click OK
  35. Click the Start button in the top right of the screen
  36. Click the Console link to watch the boot process



Reboot Windows 10 using RDP

This article is for sysadmins who know better, wanting to Shut down or Restart (or even enter Sleep) over RDP anyway.

At left, user clicked on Start, Power, then has three choices. Using RDP at right, choices are rather limited.

Using Command Prompt

Open a Command Prompt

a. To initiate a Shut down, type:

shutdown /s /t 0

then press Enter Continue reading “Reboot Windows 10 using RDP” »


Enable TLS 1.0 in Firefox Browser

Firefox 43 supports TLS 1.0, 1.1, and 1.2 by default. You shouldn’t need to make any changes, but you can double-check the settings here if you like:

(1) In a new tab, type or paste about:config in the address bar and press Enter/Return. Click the button promising to be careful.

(2) In the search box above the list, type or paste TLS and pause while the list is filtered Continue reading “Enable TLS 1.0 in Firefox Browser” »


Solving A remote code execution vulnerability exists in the Credential Security Support Provider protocol (CredSSP) on Windows RDP


Use the group policy settings changes described below to rollback the changes to ‘Vulnerable’ state to allow RDP access.

1. Open Group Policy Editor, by executing gpedit.msc

2. Policy path: Computer Configuration -> Administrative Templates -> System -> Credentials Delegation

Run gpedit.msc and expand Administrative Templates Continue reading “Solving A remote code execution vulnerability exists in the Credential Security Support Provider protocol (CredSSP) on Windows RDP” »


Docker Commands

Working with Docker Images

Docker containers are built from Docker images. By default, Docker pulls these images from Docker Hub, a Docker registry managed by Docker, the company behind the Docker project. Anyone can host their Docker images on Docker Hub, so most applications and Linux distributions you’ll need will have images hosted there.

To check whether you can access and download images from Docker Hub, type:

docker run hello-world

The output will indicate that Docker in working correctly:

Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
1b930d010525: Pull complete
Digest: sha256:41a65640635299bab090f783209c1e3a3f11934cf7756b09cb2f1e02147c6ed8
Status: Downloaded newer image for hello-world:latest

Hello from Docker!
This message shows that your installation appears to be working correctly.

Docker was initially unable to find the hello-world image locally, so it downloaded the image from Docker Hub, which is the default repository. Once the image downloaded, Docker created a container from the image and the application within the container executed, displaying the message. You can search for images available on Docker Hub by using the docker command with the search subcommand. For example, to search for the Ubuntu image, type: Continue reading “Docker Commands” »


Install Docker on Debain 10

Installing Docker

The Docker installation package available in the official Debian repository may not be the latest version. To ensure we get the latest version, we’ll install Docker from the official Docker repository. To do that, we’ll add a new package source, add the GPG key from Docker to ensure the downloads are valid, and then install the package.

First, update your existing list of packages:

sudo apt update

Next, install a few prerequisite packages which let apt use packages over HTTPS:

sudo apt install apt-transport-https ca-certificates curl gnupg2 software-properties-common

Then add the GPG key for the official Docker repository to your system: Continue reading “Install Docker on Debain 10” »


Install Netxtcloud on Debian 10

Install Apache, MariaDB and PHP

NextCloud runs on the webserver, written in PHP and uses MariaDB to store their data. So you will need to install Apache, MariaDB, PHP and other required packages on your system. You can install all of them by running the following command:

apt-get install apache2 libapache2-mod-php mariadb-server php-xml php-cli php-cgi php-mysql php-mbstring php-gd php-curl php-zip wget unzip -y

Once all the packages are installed, open the php.ini file and tweak some recommended settings:

nano /etc/php/7.3/apache2/php.ini

Change the following settings:

memory_limit = 512M
upload_max_filesize = 1024M
post_max_size = 1024M
max_execution_time = 300
date.timezone = Asia/Dhaka

Save and close the file when you are finished. Then, start the Apache and MariaDB service and enable them to start after system reboot with the following command: Continue reading “Install Netxtcloud on Debian 10” »