Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

ssh only key

#On Client:
ssh-keygen -t rsa
scp ~/.ssh/id_rsa.pub username@hostname:~/.ssh/authorized_keys

#On Server (to disable passwords and only allow key)
sudo nano /etc/ssh/sshd_config
#change "PasswordAuthentication yes" --> "PasswordAuthentication no"
#remove "#" in front of the line if present
Source by www.thomas-krenn.com #
 
PREVIOUS NEXT
Tagged: #ssh #key
ADD COMMENT
Topic
Name
7+2 =