SSH Keys Configure
November 17, 2017

1.Generate SSH Key on your machine

ssh-keygen -t rsa

2. Create user and configure sshd

# Creating User
useradd -g users -d /home/[username] -s /bin/bash [username]

# Copy .pub to /home/[username]/.ssh/authorized_keys
# chmod 700 /home/[username]/.ssh
# chmod 600 /home/[username]/.ssh/authorized_keys

# Configure sshd
vi /etc/ssh/sshd_config
# PermitRootLogin no
# PubkeyAuthentication yes
# PasswordAuthentication no
# ChallengeResponseAuthentication no
# AllowUsers [username]

# Reload & restart
service sshd reload
service sshd restart