Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

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

Source by kb.iu.edu #
 
PREVIOUS NEXT
Tagged: #add #ssh #key #server
ADD COMMENT
Topic
Name
4+5 =