Allow login via SSH key pair to linux machine

created by , 22. 02. 2014

This tutorial will show you how to configure linux machine to allow you to log into this machine using SSH key pair.

Inputs / Conditions / Prerequisites
Steps
  • 1

    Login into linux machine where you want to enable ssh key pair login for particular user.

  • 2

    In that user's home directory create directory .ssh

    mkdir /home/[username]/.ssh

    Replace [username] with user name of that user.

  • 3

    Copy file with SSH public key to that server. This file may be named like 'id_rsa.pub'.

  • 4

    append content of that file to file .ssh/authorized_keys

    cat id_rsa.pub >> /home/[username]/.ssh/authorized_keys

  • 5

    Server is now configured to allow you to login via SSH key pair.

Share

Let your friends know about this site...