Use Xshell to connect to Linux
I want to install Linux on my machine and use xshell for access. However, after a long time, I am prompted "cocould not connect to '123' ON THE xshell side. 168.54.100 '(port 22): Connection failed ". After a long time on the Internet, no solution was found. In the end, I saw in an article that the Linux Firewall was not related and the ssh service was not started. Later I re-installed all the services and shut down the firewall and started the ssh service, finally succeeded! Now, I want to help others!
1. Install VMware11.0, which has many
2. install CentOS-6.5-x86_64-LiveDVD.iso, I use this version is also downloaded from the Internet, more than 700 M; there is a minimum system online, I also tried, do not know why is not installed, if the installation is successful, please advise.
3. Follow the instructions in the following tutorial.
After step 1 is completed, no reference is made. In this case, I enter the setup command in linux, and no information is found in "EDIT DEVICES. In my opinion, some configuration files are deleted in the previous operation. It doesn't matter. We can create another configuration file on our own.
4. Enter ifconfig in linux and the IP address is not displayed. Next run vi/etc/sysconfig/network-scripts/ifcfg-eth0, open the file, it is found that the file is empty, this is because the previous steps to delete the file. Enter the following information in this file:
DEVICE = eth0
ONBOOT = yes
BOOTPROTO = static
IPADDR = 192.168.1.8
NETMASK = 255.255.255.0
GATEWAY = 192.168.1.1
IPADDR is set according to your needs. I set the ip address of the Virtual Machine dedicated network to 54 CIDR blocks. Here, my IPADDR is set to 192.168.54.100, And the GATEWAY is set to 192.168.54.1.
Save and exit.
Enter ifconfig again to view the IP address. Enter setup. You can also see the information you just set in "edit devices. The local IP address is set successfully.
5. Disable the linux Firewall
Service iptables stop
Chkconfig iptables off
6. Start the ssh service
Service sshd start
7. In windows, open the command line and the following message appears:
C: \ Users \ Administrator> ping 192.168.54.100
Pinging 192.168.54.100 with 32 bytes of data:
Reply from 192.168.54.100: byte = 32 time <1 ms TTL = 64
Reply from 192.168.54.100: byte = 32 time <1 ms TTL = 64
Reply from 192.168.54.100: byte = 32 time = 1 ms TTL = 64
Reply from 192.168.54.100: byte = 32 time <1 ms TTL = 64
Ping statistics for 192.168.54.100:
Packet: Sent = 4, received = 4, lost = 0 (0% lost ),
Estimated round-trip time (in milliseconds ):
Minimum = 0 ms, maximum = 1 ms, average = 0 ms
The connection is successful.
8. Now you can connect to the local linux instance through xshell again.
After summing up the above process, after installing linux, I checked the linux IP address and pinged it in Windows, however, it cannot be connected using shell. Now let's take a closer look. If the ping is successful, the network connection is normal. It should be disabled on linux. In this case, steps 5th, 6, and 7 can be directly connected. I have not tried this because of time. If you are interested, you can try it.
I have just learned about linux. I may find something wrong in this article. Please contact me and correct me.
More Xshell Tutorials:
Xshell uploads files to Linux Hosts in Windows
Troubleshooting of Chinese garbled characters when Xshell logs on to CentOS 6.3
VirtualBox4.12 text installation CentOS 5.4 and Xshell connection tutorial PDF
Xshell connects to CentOS6.5 iptables or ls to output garbled characters
Use Xshell to log on to VMware Linux
Use the Xshell key authentication mechanism to remotely log on to Linux
This article permanently updates the link address: