In this video, we show how to create and authorize SSH edb25519 keys to login to a Linux server running Ubuntu server 20.04 for example
SSH keys are a more secure method of authentication than using a username and password and edb25519 is a more modern and less intensive algorithm then RSA
We show how to generate an SSH key pair, how to upload the public key to the server, how to disable password authentication on the server to enforce SSH key authentication and how to create a config file to simplify logins when you have multiple keys for instance
Useful links:
[ Ссылка ]
=============================
SUPPORT THE CHANNEL
Donate through Paypal:
[ Ссылка ]
Donate through Buy Me A Coffee:
[ Ссылка ]
Become a monthly contributor on Patreon:
[ Ссылка ]
Become a monthly contributor on YouTube:
[ Ссылка ]
==============================
==============================
MEDIA LINKS:
Website - [ Ссылка ]
Twitter - [ Ссылка ]
Facebook - [ Ссылка ]
Linkedin - [ Ссылка ]
Instagram - [ Ссылка ]
==============================
Steps taken:
1) Generate SSH key pair on workstation
cd ~/.ssh
ssh-keygen -t ed25519 -f test-key -C "test@test.com"
Where ed25519 is the encryption algorithm we'll use, test-key is the identity we'll give this key pair and test@test.com is a comment we'll attach to this
2) Distribute and authorize key for authentication
ssh-copy-id -i test-key test@192.168.1.20
Where test-key is the identity of the key we want authorizing for the user account test on the server 192.168.1.20
3) Disable password authentication on server
sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak
sudo nano /etc/ssh/sshd_config
Look for a line saying
PasswordAuthentication yes
Change this to
PasswordAuthentication no
NOTE: Ubuntu servers have one line with this commented out and another which is active. We want to change the active one
Restart SSH
sudo systemctl restart sshd
Then check the service is still working
sudo systemctl status sshd
4) Use the SSH config file on the workstation to manage multiple keys
touch config
chmod 600 config
nano config
Host *
IdentitiesOnly yes
Host server1
HostName 192.168.1.20
User test
IdentityFile "/home/fred/.ssh/test-key"
Host server2
HostName server2.test.com
User prod
IdentityFile /home/fred/.ssh/prod-key
NOTE: In the above example, Fred is the user account we're logged into on the workstation where SSH is being used, but we login to different servers using different user names and different keys
These are just examples of what is possible though as it is not recommened to leave usernames in the config file in case somebody gains access to it
Credits
LoveLife | Instrumental Prod. Blue Mango | EQMUSEQ.COM by Don Da Vinci
[ Ссылка ]
00:00 Intro
00:31 Overview
05:17 Create Keys
10:41 Authorize Public Key
19:57 Disable Password Authentication
26:12 Multiple Keys and Config File
ssh keys explained,ssh keys ubuntu,ssh keys ubuntu 20.04,ssh keys for dummies,ssh keys ubuntu server,ssh keys ed25519,ed25519,ssh auth method private key,ssh authorizedkeys,ssh config file,ssh configuration,ssh configuration in linux,ssh configuration ubuntu,ssh config file ubuntu,ssh config file ubuntu 20.04,ssh ed25519 key generate,openssh,public key,private key,generate keys,ssh keys,ssh,keys,how to use ssh keys,key authentication
SSH Key Authentication Ubuntu 20.04
Теги
ssh keys explainedssh keys ubuntussh keys ubuntu 20.04ssh keys for dummiesssh keys ubuntu serverssh keys ed25519ed25519ssh auth method private keyssh authorizedkeysssh config filessh configurationssh configuration in linuxssh configuration ubuntussh config file ubuntussh config file ubuntu 20.04ssh ed25519 key generateopensshpublic keyprivate keygenerate keysssh keyssshkeyshow to use ssh keyskey authentication