SSH
Disable Root SSH
$ vim /etc/ssh/sshd_config
# To disable direct root SSH login, you need to add following to /etc/ssh/sshd_config
PermitRootLogin no
# To enable direct root SSH login, you need to add following to /etc/ssh/sshd_config
PermitRootLogin yes
# After you do the changes, save and exit. Then restart sshd.
$ /etc/rc.d/sshd onerestart
Performing sanity check on sshd configuration.
Stopping sshd.
Waiting for PIDS: 2021.
Performing sanity check on sshd configuration.
Starting sshd.
If error:
$ /etc/rc.d/sshd restart
Performing sanity check on sshd configuration.
No host key files found
# Before generate your ssh keygen
$ ls /etc/ssh
moduli ssh_config sshd_config
$ ssh-keygen -A
$ ls /etc/ssh
moduli ssh_host_dsa_key.pub ssh_host_ed25519_key ssh_host_rsa_key.pub
ssh_config ssh_host_ecdsa_key ssh_host_ed25519_key.pub sshd_config
ssh_host_dsa_key ssh_host_ecdsa_key.pub ssh_host_rsa_key
Reference
FEATURED TAGS
algorithm
algorithmproblem
architecturalpattern
architecture
aws
c#
cachesystem
codis
compile
concurrentcontrol
database
dataformat
datastructure
debug
design
designpattern
distributedsystem
django
docker
domain
engineering
freebsd
git
golang
grafana
hackintosh
hadoop
hardware
hexo
http
hugo
ios
iot
java
javaee
javascript
kafka
kubernetes
linux
linuxcommand
linuxio
lock
macos
markdown
microservices
mysql
nas
network
networkprogramming
nginx
node.js
npm
oop
openwrt
operatingsystem
padavan
performance
programming
prometheus
protobuf
python
redis
router
security
shell
software testing
spring
sql
systemdesign
truenas
ubuntu
vmware
vpn
windows
wmware
wordpress
xml
zookeeper