Linux SSH Hardening
75 words
One minute
SSH with Username and Password
1
| ssh <hostname OR IP Address>
|
1
| ssh <user>@<hostname OR IP Address>
|
SSH with Public and Private Key
Generate Keys
Copy Public Key to the Server
1
| ssh-copy-id mark@node01
|
Check the Copied Public Key on the Server
1
| cat /home/mark/.ssh/authorized_keys
|
Access the Server
Hardening SSH Service
1
| vi /etc/ssh/sshd_config
|
1
2
3
4
| ...
PermitRootLogin no
PasswordAuthentication no
...
|