ssh setup
ssh server version
apt list openssh-server
regenerate ssh keys
dpkg-reconfigure openssh-server
ssh configuration keys only
sudo vim /etc/ssh/sshd_config
PubkeyAuthentication yes
PasswordAuthentication no
ssh service control
systemctl start ssh.socket
systemctl stop ssh.socket
systemctl enable ssh.service
systemctl start ssh.service
systemctl status ssh.service
systemctl stop ssh.service
systemctl disable ssh.service
SSH Banner
You can include messages, art, etc on your ssh login, if you like that stuff. It won’t stop hackers, but makes the powers that be feel safer.
sudo vim /etc/issue.net
This is a private computer system is for authorized use only. You
You are not authorized. Logoff immediately or be subject to
civil and/or criminal charges and/or criminal penalties as well
costs incurred as a result of your unauthorized access,
entry, use, abuse, or tampering.
Any use of these systems and all files on these systems may be
intercepted, monitored, recorded, copied, audited, inspected, and
disclosed to authorized system administrators and law enforcement
personnel, as well as authorized individuals of other organizations
at our discretion.
By accessing, using, or abusing this system, you authorize
the maximum possible punishment and fines as well as your
Personal repayment of all financial restitution related
to your activity on, or through this system.
_.-
.' \
/ ,
| ' / | YOU ARE NOT AUTHORIZED!
/__ ___ ( /
\\ `-'-|` \\ | LOG OFF IMMEDIATELY!
|'_/ . `__/ /
'._ /|\ ,--' THIS SYSTEM IS FOR PRIVATE USE ONLY
|_..;/
'#''