Home
Windows
    Windows Server
    Windows Client OS
Linux
Powershell
Virtualization
    VMware
    Hyper-V
Cloud Computing
    Citrix XenApp
    Citrix Xendesktop
Useful links
About
ajni.IT -
  • Home
  • Windows
    • Windows Server
    • Windows Client OS
  • Linux
  • Powershell
  • Virtualization
    • VMware
    • Hyper-V
  • Cloud Computing
    • Citrix XenApp
    • Citrix Xendesktop
  • Useful links
  • About

Configure SSH Key-Based Authentication on a Linux System

March 10, 2020 by AJNI No Comments

By default, Linux systems allow both password-based and key-based authentication over SSH. If you have a server with SSH open to the world, password-based authentication shouldn’t be allowed at all.

To disable password-based authentication, edit the SSH config file:

nano /etc/ssh/sshd_config

Add the following lines:

PasswordAuthentication no

PubkeyAuthentication yes

Now generate a new private/public key pair:

ssh-keygen

id_rsa is your private key

id_rsa.pub is the public certificate thumbprint that must be added to ~/.ssh/authorized_keys

nano ~/.ssh/authorized_keys

The SSH service must be restarted.

service ssh restart

Now you can connect to your server with key-based authentication only. If connecting from a Linux system the file’s permissions must be set to 600.

chmod 600 id_rsa

ssh -i id_rsa ip@username

If you like using Putty, you’ll have to load the file with PuttyGen and save the private key as .ppk.

PuttyGen can be downloaded here: https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html

Links:

https://askubuntu.com/questions/346857/how-do-i-force-ssh-to-only-allow-users-with-a-key-to-log-in

Reading time: 1 min

Cheap private servers on the Cloud

March 9, 2020 by AJNI No Comments

Today I stumbled upon this very useful site that helps you find very cheap virtual private servers (VPS) around the globe. The public IPv4 address is shared and NAT'd across multiple servers. If that's no problem for you, the cheapest servers are 0.15€ a month with 128MB RAM and 1 vCPU.

Also, some public IP addresses are blocked in China and/or Russia.

Have fun!

https://www.serverhunter.com/

Reading time: 1 min

Tip Of the Day

  • Delete or rename a folder with a blank space at the end

    1 month ago

Recent Posts

  • Microsoft AlwaysOn VPN Deployment
  • Delete or rename a folder with a blank space at the end
  • Automatic program start at logon with GPOs
  • Reset Computer Secure Channel of a Domain Computer with one PowerShell command
  • Let Outlook connect to Exchange Online instead of Exchange On-Prem

Categories

  • Azure (5)
  • Citrix XenApp (6)
  • Citrix Xendesktop (4)
  • Cloud Computing (18)
  • Coding (1)
  • Hyper-V (5)
  • Linux (8)
  • Powershell (8)
  • Security (2)
  • VDI (4)
  • Virtualization (12)
  • VMware (5)
  • Windows (16)
  • Windows Client OS (14)
  • Windows Server (23)

Archives

  • December 2020
  • November 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • February 2020
  • November 2019
  • October 2019
  • September 2019
  • August 2019
  • July 2019
  • June 2019
  • May 2019
  • April 2019
  • March 2019

ajni IT © 2019