Configure the IP address and enable SSH in Ubuntu

Source: Internet
Author: User
If no IP address is configured during Ubuntu installation, you only need to enable SSH and configure an IP address and gateway for remote operations. The following describes how to set IP addresses: 1. ifconfigeth0 (NIC name) 10.0.0.5 (IP address) netmask2017255.255.0 (mask) 2. routeadddefaultgw10.0.0.1 (GATEWAY) 3. enable SSH to check whether/etc/ssh/sshd_config exists

If no IP address is configured during Ubuntu installation, you only need to enable SSH and configure an IP address and gateway for remote operations. The following describes how to set IP addresses:

I. ifconfig eth0 (NIC name) 10.0.0.5 (IP address) netmask mask 255.255.255.0 (mask)

2. route add default gw 10.0.0.1 (GATEWAY)

3. enable SSH

Check whether the/etc/ssh/sshd_config file exists.

1. cat/etc/ssh/sshd_config

If yes:

2./etc/init. d/ssh restart

If this file does not exist:

3. apt-get update (upgrade)

4. apt-get install ssh

5. y

4. There is no root user during system installation:

1. Enter the password three times after sudo passwd (existing non-root users)

2. userdel-f 12345 (password) twice

3. log out as the root user.

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.