Skip to main content

Linux Server Administration

Table of Contents:

Introduction

In this Section we learn to Configurate a V Server.

Create-SSH-Keys

  1. Create SSH-Keys with Sandard ed22591 on your local maschine.
    ssh-keygen -t ed25519 -C "your-email@example.com"

Login-with-Passwort

  1. Login to your VServer with your Username and passwort:
    ssh <username>@<ip-adress> 

Deacitvate-Passwortlogin

  1. Use "type" on your local maschine to copy your generated public key on your VServer:

    type C:/Path/to/key| ssh username@ip-adress "cat >> /home/user/.ssh/authorized_keys"
  2. Try to login to your VServer with your copied public key.

    ssh -i C:/Path1/to/key <usernema>@<ip-adress>
  3. Deatkivate Password Login.

    1. Go to "etc/ssh/sshd.config" with Bash
    sudo nano /etc/ssh/sshd_config
    1. Serarch to "#PasswortAuthentication yes" and change it to "PasswortAuthentication no"
    2. Save the file and exit
    3. Restart the sshd service.
    sudo sysrtemctl restart ssh.service