Ubuntu get root user rights, use Xshell Connection!

Source: Internet
Author: User

First, get root user rights

Open the Linux terminal command, enter

sudo passwd root

Enter new UNIX Password: (enter your password here)

Retype new UNIX Password: (Determine the password you entered)

Passwd:password updated successfully

Later, if you want to get root privileges, just do the following:
Su Root

Password: (Enter the password you set above here)

If you want to disable the root account again,

Then you can execute sudo passwd-l root

Second, open the Linux terminal with Xshell

Test the IP of the virtual machine is not available with Ping

Ping the words to see if the firewall is not open 22 port

If the firewall's okay, look at the SSH service.

The open SSH service needs to be installed Openssh-server

sudo apt-get install Openssh-server

Then confirm that the Sshserver is started:

Ps-e |grep SSH

If you see sshd that means Ssh-server has been activated.

If not, you can start this way: Sudo/etc/init.d/ssh start

Ssh-server configuration file is located in/Etc/ssh/sshd_config, where you can define the SSH service port, the default port is 22, you can define yourself as a different port number, such as 222.

Then restart the SSH service:
Sudo/etc/init.d/ssh stop

Sudo/etc/init.d/ssh start
SSH default Port 22

Log in to the virtual machine to view the ports currently open on the server: SS-LNT

  

Ubuntu get root user rights, use Xshell Connection!

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.