美文网首页
常用Ubuntu命令

常用Ubuntu命令

作者: CerasusLand | 来源:发表于2017-02-20 11:23 被阅读18次
切换到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  

相关文章

网友评论

      本文标题:常用Ubuntu命令

      本文链接:https://www.haomeiwen.com/subject/euiswttx.html