Virtualbox centos securecrt Network Configuration

Source: Internet
Author: User
Tags ssh server

# Vi/etc/sysconfig/network-scripts/ifcfg-eth0

 

Device = eth0 # describe the device alias for the NIC, for example, it is eth0 in the ifcfg-eth0 File

onboot = yes # whether to set this network interface when the system starts. If yes, activate this device when the system starts

 

Device = "eth0"
Hwaddr = "08: 00: 27: DB: 77: 6f"
Nm_controlled = "yes"
Onboot = "yes"
Bootproto = "DHCP"

 

1. Set the network connection mode of the VM to bridge.

 A: Modify the SSH configuration file.

Root @ sample ~] # Vi/etc/ssh/sshd_config using VI to open the SSH configuration file

# Protocol locate this row and delete the line header "#". Then, delete ", 1" at the end of the line, and only allow connections in SSH2 mode.
Bytes
The Protocol 2 protocol changes to this status after modification. Only SSH2 is used.

# Serverkeybits 768 rows find this line, remove "#" at the beginning of the line, and change 768 to 1024
Bytes
Changed serverkeybits 1024 bytes to this status, and changed the serverkey strength to 1024 bits.

# Permitrootlogin Yes locate this line, remove "#" at the beginning of the line, and change "yes" to "no ".
Bytes
Permitrootlogin no logs is changed to this status and cannot be logged on using root.

# Passwordauthentication Yes locate this line and change Yes to no
Bytes
Passwordauthentication No. login is changed to this status, and password-based logon is not allowed.

# Permitemptypasswords no longer find this row and delete the line header "#". Empty Password Logon is not allowed.
Bytes
Permitemptypasswords No. Changed to this status. Do not log on with a blank password.

Save and exit

   B: restart the SSH service.
   Note that the absolute path must be used here.
Root @ sample ~] #/Etc/rc. d/init. d/sshd restart the SSH server
Stopping sshd: [OK]
Starting sshd: [OK] the restart SSH server is successfully restarted.

 

View IP

Ifconfig | less

Related Article

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.