Windows Remote Linux (centos 5.6)

Source: Internet
Author: User
Tags ssh port

Two tools are used:

1.Securecrt(Securecrt.zip) (this does not have a graphical interface, all command lines)

Protocol: SSH2

Host Name: 192.168.1.111)

Port: xxxx (port is not the default 22, port modification, see http://wenku.baidu.com/view/dab7984ae45c3b3567ec8bdd.html)

(Modify the port method:

First: Modify/etc/hosts. Deny and add sshd: all to it. Note that # is not allowed.
Then, modify:/etc/hosts. Allow and set sshd: 192.168.1.16 as follows:
In this way, only the IP address 192.168.1.16 can be used to log on to the Linux server through SSH.

Then, modify the configuration file.
VI/etc/ssh/sshd_config
Find the section # port 22, which indicates that port 22 is used by default and changed to the following:
Port 22
Port 999
Remove.
Save and exit
Enter the command in the terminal:/etc/init. d/
Sshd restart restarts the SSH service.
In this way, the ssh port will work on both 22 and 999.
Now edit the firewall configuration: VI/etc/sysconfig/iptables
Port 999 is enabled.
-A RH-Firewall-1-INPUT-M state -- state new-m tcp-p tcp -- dport 999-J accept

Enter the command/etc/init. d/iptables restart on the terminal to restart the firewall access rules.
Now, use the SSH tool to connect to port 999 to test whether the connection is successful. If the connection is successful, edit the sshd_config settings and the firewall port, delete port22, and restart the SSH service and firewall access rules.

To prevent unknown situations such as disconnection, network disconnection, and misoperation during the conf modification process, we first set two ports and shut down one after the test is successful, you can also connect to the debugging through another port to avoid having to send people to the data center if the connection fails, resulting in more complicated problems.

)

Firewall: none (if the Chinese version is used, "no firewall is found in the database" may be reported during connection ". This session will try not to connect through the firewall ." Error. solution:

First open the configuration file directory of securecrt (which can be found in global configuration. That is, the config directory specified at the beginning of installation. my options are D: \ Linux Remote \ wll \ config)

Find the configuration directory, go to the firewils folder (if there is no such folder, create one), and create a folder named "none. ini "empty file, which is equivalent to creating a" NONE "fire wall in the database

)

In this way, you can connect to it. In the command line, you can copy the content of windows and paste it with the reversed mouse key.

 

2. VNC(Vnc.rar) (there is a graphical interface, but it cannot be copied and pasted in a non-graphical interface. Therefore, a securecrt is used to complete the settings required for the VNC graphic interface. After the settings are completed, you can uninstall securecrt)

Set link: http://wenku.baidu.com/view/011d642b4b73f242336c5f66.html (tested by myself, exactly as in the library, without any modifications. Copy the part that involves VI. You can directly copy the part in windows, move the cursor in VI to the position to be pasted, and right-click it to paste it)

 

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.