Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save wpupru/3760ab9f1a08e2a4e04f8bcb01d98c59 to your computer and use it in GitHub Desktop.

Select an option

Save wpupru/3760ab9f1a08e2a4e04f8bcb01d98c59 to your computer and use it in GitHub Desktop.
Авторизация_по_ключу_для_пользователя
Авторизация_по_ключу_для_пользователя
mkdir -p /home/awsnrusl/.ssh
ssh-keygen -t rsa -b 1024 -f /home/awsnrusl/.ssh/id_rsa
cd /home/awsnrusl/.ssh/
конвертируем ключ в формат openssh:
# ssh-keygen -i -f id_rsa_pub >> authorized_keys
RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile %h/.ssh/authorized_keys
Обязательно!!!
Для папки .ssh и файла authorized_keys владельцем
должен быть обязательно этот пользователь!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment