Linux Server Administration
Table of Contents:
Introduction
In this Section we learn to Configurate a V Server.
Create-SSH-Keys
- Create SSH-Keys with Sandard ed22591 on your local maschine.
ssh-keygen -t ed25519 -C "your-email@example.com"
Login-with-Passwort
- Login to your VServer with your Username and passwort:
ssh <username>@<ip-adress>
Deacitvate-Passwortlogin
-
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" -
Try to login to your VServer with your copied public key.
ssh -i C:/Path1/to/key <usernema>@<ip-adress> -
Deatkivate Password Login.
- Go to "etc/ssh/sshd.config" with Bash
sudo nano /etc/ssh/sshd_config- Serarch to "#PasswortAuthentication yes" and change it to "PasswortAuthentication no"
- Save the file and exit
- Restart the sshd service.
sudo sysrtemctl restart ssh.service