常用Ubuntu命令
2017-02-20 本文已影响18人
CerasusLand
切换到root用户
sudo -s
切换到某个用户
su - username
查看当前用户
whoami
Generate a sshkey
ssh-keygen -t rsa -C "email@example.com"
Root login
ssh root@SERVER_IP_ADDRESS
Create a New User
adduser demo
As root, run this command to add your new user to the sudo group
gpasswd -a demo sudo
Change file authorized
chmod 600 .ssh/authorized_keys
Reload SSH
service ssh restart