Тёмный

#5 Setup SSH key authentication for Linux server - Cyberpanel Tutorial 

Ricky Wahowa
Подписаться 6 тыс.
Просмотров 1,5 тыс.
50% 1

Setup SSH key authentication login for your linux server.
SSH Configuration post : bizanosa.com/generate-ssh-key...
In this post you’ll setup SSH keys for your server. You will setup SSH Key authentication so that you can log in via your Private and public Key.
Feel free to follow along with any Linux distro.
The steps of what we’ll do :
Generate SSH keys on our Local Linux / Mac computer
Copy our public key onto the Server
Test if we can log in via the SSH key pair
Disable root login and password Authentication.
Before continuing with this post, ensure you create a new Sudo user on your Linux server.
If you are using Windows, watch this video which will show you how to generate and enable SSH key pair login into your Linux Server.
Take Note :
You can generate the keys using default options whereby, the name of the keys will be the default names ( id_rsa & id_rsa.pub ) and their location will be the default location (.ssh) . Use this if you only have one server to manage or if it is your first server. For the purpose of this post,We’ll call this , Default generation of keys .
You can also change settings for where to store and how to name the keys. This is better because you can create multiple ssh key pairs for different users or servers. For the purpose of this post we’ll call this , Custom generation of keys.
In this post I will show you how to handle both scenarios, starting with default generation of keys.
The playlist links for this Cyberpanel Tutorial Series
[Windows] Cyberpanel Tutorial Playlist for Windows Users: • Free CyberPanel Tutori...
[linux Mac] Cyberpanel Tutorial Playlist for Linux/Mac users : • Free CyberPanel Tutori...
How do I find my SsH keys and get them to work?
This video is a step by step guide that will show you how to generate keys, find them and use them to log into your server.
On a Linux computer or a mac, your SsH keys are stored in a hidden folder called .ssh .
This folder is available on your local computer and on the server as well.
.
If this video was helpful to you, please consider supporting my channel : paypal.me/rwahowa
.
GET SOCIAL WITH ME:
FACEBOOK: / rwahowa
INSTAGRAM: / rwahowa
TWITTER: / rwahowa
VIMEO: vimeo.com/bizanosa/
WEBSITE : rwahowa.com

Опубликовано:

 

15 сен 2020

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 15   
@alam-talash
@alam-talash 3 года назад
I think this tutorial is one the most amazing and well explained for creating SSH key and configuring into the server. Thanks for the great explanation and excellent tutorial.
@rwahowa
@rwahowa 3 года назад
Thanks mate. It used to give me problems years back too. Glad to be of help
@alam-talash
@alam-talash 3 года назад
@@rwahowa thanks for the reply. I tried the same process but it gives me this error. Permission denied (publickey,gssapi-keyex,gssapi-with-mic). Could you please help me?
@rwahowa
@rwahowa 3 года назад
Do not use sudo when creating the directory for storing the ssh keys. Once you add the public key to your server change the permissions as indicated here bizanosa.com/generate-ssh-keys-linux-server/
@alam-talash
@alam-talash 3 года назад
@@rwahowa Thanks but when I try to add the public key to server (ssh-copy-id ..... ) it gives me Permission denied error. I installed ssh-copy-id by brew but still I got the permission denied error when i run (ssh-copy-id .....).
@rwahowa
@rwahowa 3 года назад
You can copy the content of the public key manually into your server. Open the public key using a plain text editor or any code editor. Then copy all it's content into the authorized key file on your server. sudo mkdir ~/.ssh sudo nano ~/.ssh/authorized_keys Then change permissions: sudo chmod 700 -R ~/.ssh Then… sudo chmod 600 ~/.ssh/authorized_keys
@HnyB33
@HnyB33 2 года назад
Hi, Just wanted to let you know that ssh-copy-id changes the permissions as well, to the needed 700 and 600. No need for you to change permissions manually with command chmod if you use ssh-copy-id command to copy the public key to server.
@rwahowa
@rwahowa 2 года назад
Yeah that's true. Some people may prefer using a permission of 400 instead of 600, so it's a good one line to add during the process.
@ataimebenson
@ataimebenson 2 года назад
But why do we have to disable root login and password authentication ?
@rwahowa
@rwahowa 2 года назад
To harden your server.
@ataimebenson
@ataimebenson 2 года назад
I have a Python script written in Scrapy and Selenium and I want to run it on Vultr Vps using Ubuntu. Do I have to go through all these steps in your videos first? I am very new to Ubuntu and Vultr
@rwahowa
@rwahowa 2 года назад
You need to setup your server and try to secure it. These steps will help with that
@ataimebenson
@ataimebenson 2 года назад
@@rwahowa After setting it up.and securing it, do you have a video that shows how to deploy scripts to Vultr server ? Or can you point me to a video ?
@rwahowa
@rwahowa 2 года назад
I have a Cyberpanel and virtualmin tutorial. They are control panels you can use for hosting websites. Check my playlists
@ataimebenson
@ataimebenson 2 года назад
@@rwahowa Thanks, I will check them
Далее
OpenSSH for Absolute Beginners
23:00
Просмотров 102 тыс.
🎙СТРИМ на 4 МИЛЛИОНА🍋
3:12:45
Просмотров 1,3 млн
Secret Experiment Toothpaste Pt.4 😱 #shorts
00:35
An Illustrated Guide to OAuth and OpenID Connect
16:36
Просмотров 570 тыс.
How to Make Your Own VPN (And Why You Would Want to)
25:54
HTTPS, SSL, TLS & Certificate Authority Explained
43:29
Self Host 101 - Set up and Secure Your Own Server
25:56
🎙СТРИМ на 4 МИЛЛИОНА🍋
3:12:45
Просмотров 1,3 млн