Open SSH security best practices
Use private/public keys authentication
Scp –p id_rsa.pub remoteuser@remotehost: ``` <div data-gb-custom-block data-tag="hint" data-style='danger'>The `remoteuser` should never be root. Select the default non-root user as `remoteuser` instead.</div>ssh remoteuser@remotehost mkdir ~/.ssh chmod 700 ~/.ssh cat id_rsa.pub >> ~/.ssh/authorized_keys chmod 600 ~/.ssh/authorized_keys mv id_rsa.pub ~/.ssh logoutrm id_rsa.pub$ chmod 700 ~/.ssh $ chmod 600 ~/.ssh/authorized_keys# Disable password authentication forcing use of keys PasswordAuthentication no
Disable username and password authentication
Configure idle timeout interval
Disable empty passwords
Limit SSH access to a few users
Disable root login
Disable weak cipher
Use a non-standard port
Limit SSH exposure with network controls
Enable multifactor authentication
PreviousOne Identity Safeguard authentication method removed from My account settingsNextPassword strength rating
Last updated
Was this helpful?