Common commands after creating a server

Source: Internet
Author: User
Tags ssh access
After creating a server, you always need to initialize the server by using common commands. however, these commands are basically no longer used after initialization. if you re-create the server, you have to go to Google... so it is recorded here. 1. ssh creation... information & frequently-used commands after server creation some initialization steps are always required and some frequently-used commands are often required. however, these commands are basically no longer used after initialization. if you re-create the server, you have to go to Google... so it is recorded here. 1. after the server is established through ssh, the first thing is to install openssh-server. 2. add user [plain] useradd USER_NAME-G GROUP_NAME-d/home/USER_NAME passwd USER_NAME to set user password 3. set the shell program [plain] chsh-s/bin/bash USER_NAME/bin/bash Bash path. for example, ksh is/bin/ksh 4. grant the folder owner permission [plain] chown/home/USER_NAME 5. change the user group [plain] usermod-G GROUP_NAME usermod. you can also modify other things, such as man. 6. configure ssh access restrictions by adding AllowUsers USER1 USER2 to/etc/ssh/sshd_config. Note that users are separated by spaces. changing the folder owner group [plain] chgrp GROUP_NAME FOLDER_PATH sometimes requires-R if the folder has subfolders. 8. modify the folder group permission [plain] chmod g + r/w/x FOLDER_NAME 9. delete the user [plain] userdel USER_NAME and configure apache, exim, or Other things ~

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.