SecureCRT connects to the openSuSe operating system on the Virtual Machine

Source: Internet
Author: User

SecureCRT connects to the openSuSe operating system on the Virtual Machine

Problem: The VMware Player virtual machine is installed in win7 and the openSuSe operating system is installed in the Virtual Machine. Now I want to connect to openSuSe through securecrt through ssh, but the connection fails.

Solution:

By default, the ssh service is disabled in openSuSe. You can run the yast command to open the ssh service, but the connection is still unavailable after it is enabled. This may be a problem with the firewall, so the firewall is also disabled, or filter the IP address.

Should I be connected when I finish this? The result still cannot be connected. Finally, the problem is solved according to the following methods. The details are as follows:

OpenSUSE is installed in the Virtual Machine VirtualBox. By default, ssh and samba services are not started. You can run the following command (with the root permission) to view it:
# Chkconfig-l | grep-w "sshd"
Sshd 0: off 1: off 2: off 3: off 4: off 5: off 6: off
# Chkconfig-l | grep-w "smb"
Smb 0: off 1: off 2: off 3: off 4: off 5: off 6: off
It can be seen that ssh and samba are off at the 3, 4, and 5 running levels, that is, these two services are disabled. To enable these two services, run the chkconfig command:
# Chkconfig-set SSH 345
# Chkconfig-set smb 345
Then run the following command:
# Chkconfig-l | grep-w "sshd" & chkconfig-l | grep-w "smb"
Sshd 0: off 1: off 2: off 3: on 4: on 5: on 6: off
Smb 0: off 1: off 2: off 3: on 4: on 5: on 6: off
We can see that the ssh and samba services are changed to the default startup. Of course, these two services have not yet been started. You have to restart the system or run the following command to start them:
# Service sshd start
# Service smb start


Generally, ssh and samba ports are not allowed to connect to the network due to the firewall. You need to modify the firewall settings to allow access to ssh and samba Network Ports. The firewall name of OpenSUSE is SuSEfirewall2. Generally, the firewall of Linux is IPTABLE. This article only describes the firewall settings of OpenSUSE. There are many IPTABLE firewall settings on the Internet. Follow these steps to configure the SuSEfirewall2 Firewall:
1. Edit the firewall configuration file. The command is as follows:
# Vi/etc/sysconfig/SuSEfirewall2
2. Search for the keyword FW_SERVICES_EXT_TCP in the configuration file and add the TCP ports of ssh and samba:
FW_SERVICES_EXT_TCP = "ssh 445"
Ssh indicates port 22. ssh can be written directly, and samba port 445.
3. continue to search for the keyword FW_SERVICES_EXT_UDP and add the UDP port of samba:
FW_SERVICES_EXT_UDP = "137 138 139"
4. Restart the firewall (or restart the system ):
# RcSuSEfirewall2 restart


Of course, samba may not be connected at this time, because no samba user has been added. If the current system has an account named user, run the following command to add a samba user:
# Smbpasswd-auser
Enter the password as prompted. In windows, enter \ 192.168.56.101 \ user in the ing network drive. In windows, Putty can connect to the system through ssh.

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.