Answers for "add ssh key to my server"

0

add ssh key to my server

#To have access of your local machine to a server
#You need to do the following steps


#1: Create the key pair on your system by following command
  eval $(ssh-agent -$)
  ssh-keygen
  
  it'll then ask you to enter the file name(required) and 
  enter phrase(optional), complete this process and you'll
  have the key pair private and public file
  
#2: Take file.pub's key and put it in server's authorized_keys 
	(Authorized_keys file will be in your user's .ssh folder)

#3: On your local machine enter following again:
  eval $(ssh-agent -$)
  ssh-add /path/to/private-key-file
Posted by: Guest on April-29-2022

Browse Popular Code Answers by Language