New user name on Linux server

Source: Internet
Author: User

Recently the fleet stopped, need to use the boss's server run the program, here first you have to add some user name on the boss's server. The new user name method is as follows:

1. Add user name using Useradd and specify User name directory, script interpreter, user name

sudo useradd-d/home/kx-m-S "/bin/bash" kx

Here the user name is KX, the user directory is:/home/kx, the script interpreter uses the/bin/bash

2. Modify the KX password

sudo passwd kx

3. For remote login, some configuration is required

sudo vi/etc/ssh/sshd_config

Add the last line of the file:

Allowusers KX

4. Restart SSH

Service sshd Restart

Once you've done this, you can log in remotely!

Here's how to sign in:

First, look at the IP address of the server, by entering the server terminal: Ifconfig, see inet addr: Corresponding to the server's IP address, such as the IP address is: 10.4.10.172

Then, open the terminal on your own computer, enter: SSH [email protected]

New user name on Linux server

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.