-
-
Save d1i1m1o1n/6f056f13c83cc640f2323073404889aa to your computer and use it in GitHub Desktop.
Авторизация SSH по RSA ключу - TimeWeb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user - имя пользователя | |
server.timeweb.ru - сервер | |
1. На машине ssh-keygen -t rsa | |
2. Копируем, можно по FTP или одной из команд | |
2.1. ssh-copy-id -i ~/.ssh/id_rsa [email protected] | |
2.2. scp ~/.ssh/id_rsa.pub [email protected]:~ | |
3. На сервере | |
[ -d ~/.ssh ] || (mkdir ~/.ssh; chmod 711 ~/.ssh) # создание директории и изменение прав | |
cat ~/id_rsa.pub >> ~/.ssh/authorized_keys # добавление открытого ключа | |
chmod 600 ~/.ssh/authorized_keys # установка корректных прав | |
rm ~/id_rsa.pub # удаление ненужного ключа |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment