Use ssh to access linux configurations in vmware

Source: Internet
Author: User

Use ssh to access linux configurations in vmware

Centos6.3 is installed in vmware8 to learn linux, but it is very troublesome to switch between the virtual machine and the external system every time, by default, after centos is installed, it is more resource-consuming to open it on the x-window GUI by default. Therefore, you want to use ssh tools such as SecureCRT to access it.
Two problems are involved:
1. Set the ip address of the linux System in vmware. 2. The system starts the level by default.
Set the Virtual Machine Network: Edit-> Virtual Network Editor

For example, select a NAT connection (if you do not have one, create a connection and click "Add Network" to Add a new NAT connection. Apply after adding the connection ), at this time, we will proceed to the next step to change the centos connection.
 

VM-> Settings select custom in Network connection and the previously set NAT type connection


Openssh
Openssh has been installed (centos 6.3)
Change the configuration file/etc/ssh/sshd_config
Ensure
Port 22
ListenAddress 0.0.0.0
Protocol 2
The previous # is removed!

View two system ip addresses and test ping
To view the ip address in the vmwarevm, run the following command:
Ifconfig
View ip addresses in virtual machines
You can see this line:
Inet addr: 192.168.174.128 Bcast: 192.168.174.255 Mask: 255.255.255.0
Int addr: 192.168.174.128 is the IP address of the VM,
Then, run the command ipconfig in win7 cmd to view the ipv4 address of the local connection, for example, 169.254.68.68.
Ping the two ip addresses to see if the ip addresses can be pinged.

Enable sshd service
Sshd has been installed in centos, so you only need to enable the Service,
Service sshd start
Set auto-start
Chkconfig sshd on
Restart service
Service sshd restart
Check whether the service is enabled
Ps-le | grep sshd
The sshd information can be displayed to indicate that the service is enabled!

To save resources:
1. Open the/etc/inittab file: sudo vim inittab
2. In the default run level settings, you can see that the first line of writing is: id: 5: initdefault :( the default run level is 5, that is, the image
Interface)
3. Change 5 of the first line to 3.
4. Save the file and restart the system. You can see the startup text interface.

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.