Centos uses socks5 proxy for SSH Secure Login

Source: Internet
Author: User

If you log on to the server remotely, there may be some security issues, so you may use some method to improve the security of logon, such:
1. Establish a vpn connection channel. vpn transmission is encrypted and secure. Recommended for use. For more information, see ~
2. Using public keys and keys for transmission, many ssh clients now have the ability to generate key pairs, which are also easy to manage. If the company's O & M staff resign, they only need to delete the staff's public key.
3. Use the socks5 proxy to log on to the stepping stone. Socks5 is very convenient and in use. The following describes how to use socks5.
4. Other services to be supplemented
  
I. test environment:
Socks5 Proxy Server: 192.168.52.199
Application Server: 192.168.52.175
Client: 192.168.52.0/24
Experiment result: the client logs on to the 192.168.52.175 application server through the socks5 server (192.168.52.199.

Ii. Socks5 Proxy Server Configuration
Please refer to this blog article: http://www.centoscn.com/image-text/config/2013/0805/1054.html

3. Application Server Configuration
There are many ssh logon restrictions, including host restrictions and iptables firewalls. The following describes the host restrictions ()
Hosts. allow and hosts. deny are configured in the order. Remember allow and deng first.
[Root @ lx_jira_svn_s1 ~] # Vi/etc/hosts. allow
Sshd: 192.168.52.0/24,192.168 .52.175 # Allow the network segment of 192.168.0 to access the Local Machine
[Root @ lx_jira_svn_s1 ~] # Vi/etc/hosts. deny
Sshd: ALL prohibit ALL users from accessing the Local Machine

Set!

In addition, we will continue to introduce the configuration that you must use the Secure CRT firewall policy to log on.

1. Add the ss5_test.ini file with the following content:
S: "Firewall Type" = SOCKSv5_USERPASS
S: "Firewall Address" = 192.168.52.199
D: "Firewall Port" = 4102a88
S: "Proxy Prompt" = test
S: "Proxy Command" = 123
S: "Firewall User" = test
S: "Firewall Password" = 42e5552a73d766

2. Set the Application Server
[Root @ lx_jira_svn_s1 ~] # Vi/etc/hosts. allow
Sshd: 192.168.52.199, 192.168.52.175 # Only jump through 192.168.0.199 is allowed to access the Local Machine
[Root @ lx_jira_svn_s1 ~] # Vi/etc/hosts. deny
Sshd: ALL prohibit ALL users from accessing the Local Machine

View results:

If the firewall is None, you cannot log on.

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.