Update setup

master
呓喵酱 2 years ago committed by GitHub
parent 11b06cad16
commit 4b19b8a348
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 30
      setup

30
setup

@ -1,21 +1,29 @@
$ vi /etc/systemd/logind.conf
HandleLidSwitch=ignore
$ systemctl restart systemd-logind
# $ vi /etc/sysconfig/network-scripts/ifcfg-enp1s0
# /etc/sysconfig/network-scripts/ifcfg-enp1s0
#passwd
#/etc/passwd
iotcat:x:1000:1000::/home/iotcat:/bin/bash
ushio:x:1001:1001::/home/ushio:/sbin/nologin
#ushio:x:1001:1001::/home/ushio:/sbin/nologin
#visudo
$ visudo
Defaults rootpw
Defaults:ushio !rootpw
#Defaults:ushio !rootpw
iotcat ALL=(ALL) ALL
ushio ALL=(ushio) ALL
#ushio ALL=(ushio) ALL
# $ passwd -d ushio
#/etc/ssh/sshd_config
PermitRootLogin no
$ systemctl restart sshd
# ~/.ssh/authorized_keys
add .pub
sudo ln -s /home/iotcat/.ssh /root/.ssh
# on remotes
ssh-copy-id iotcat@xxx.yimian.xyz
$ passwd -d ushio
#sshd_config
disable root login

Loading…
Cancel
Save