You are viewing a single comment's thread from:

RE: How to properly setup SSH Key Authentication - If you are logging into your server with root, you are doing it wrong!

in #sysadmin7 years ago (edited)

I think a safer approach would be:

  1. Change root password
  2. Update Packages
  3. Admin Account Setup
    1. Create New User
    2. Add new user to sudo group
    3. Test login and sudo
    4. Disable root login
    5. Test ssh configuration with sshd -T
  4. SSH Key Setup
    1. Create SSH Key
    2. Install SSH Key for new user
    3. Test SSH Key authentication
    4. Disable password authentication
    5. Test ssh configuration with sshd -T
  5. Restart sshd

This breaks up Disable root login & password authentication into separate steps because it is safer. Instead of a kill switch at the end, vulnerabilities are removed in a sequence. First, a user is created and login to the user with sudo is tested and verified working. Then root logins are disabled. Next, key setup is handled along with disabling password logins.

Coin Marketplace

STEEM 0.08
TRX 0.29
JST 0.035
BTC 106577.96
ETH 3697.21
USDT 1.00
SBD 0.58