user
add new user
1 2
| adduser ubuntu useradd ubuntu
|
add user to admin group / edit sudoers
1 2
| groupadd superadmin usermod -g superadmin ubuntu
|
1
| adduser ubuntu --ingroup sudo
|
user state
upload public key
method1
new file authorized_keys
and paste your own public key into this file.
method2
1
| ssh-copy-id -i .ssh/common.pub root@ip:port
|
automatically upload public key.
change login method
1 2
| cd /etc/ssh vim sshd_config
|
1 2 3 4
| RSAAuthentication yes PubkeyAuthentication yes PermitRootLogin no PasswordAuthentication no
|
restart ssh service
log
auth.log: authentication log