mirror of
https://git.reisber.space/Reisber/Personal
synced 2026-04-03 07:36:29 +00:00
Обновить linux/ssh_key.md
This commit is contained in:
@@ -1,11 +1,11 @@
|
|||||||
###How to add SSH key to server
|
###How to add SSH key to server
|
||||||
After setting up first remote ssh connection type from your PC (not server)
|
After setting up first remote ssh connection type from your PC (not server)
|
||||||
|
|
||||||
scp C:\Users\User.ssh*.pub user@hostname:/home/user/
|
` scp C:\Users\User.ssh*.pub user@hostname:/home/user/ `
|
||||||
(example: C:\Users\user*\.ssh\id_ed25519.pub user@ip_address_of_the_host:/home/)
|
(example: C:\Users\user*\.ssh\id_ed25519.pub user@ip_address_of_the_host:/home/)
|
||||||
Then enter password, after that >
|
Then enter password, after that >
|
||||||
Go to your server and add your key, to ssh_authorized keys >
|
Go to your server and add your key, to ssh_authorized keys >
|
||||||
cat id_ed*.pub >> ~/.ssh/authorized_keys
|
`cat id_ed*.pub >> ~/.ssh/authorized_keys `
|
||||||
And don't forget to restart ssh and sshd
|
And don't forget to restart ssh and sshd
|
||||||
|
|
||||||
Use this is password authentication still works (nano /etc/ssh/sshd_config.d/50-cloud-init.conf)
|
Use this is password authentication still works (nano /etc/ssh/sshd_config.d/50-cloud-init.conf)
|
||||||
Reference in New Issue
Block a user