Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Modify Linux SSH default port 22 in several ways     - Linux processes in memory and memory cgroup statistics (Linux)

- PSUADE installation under Linux (Linux)

- Linux operating system log system (Linux)

- Linux Network Programming --IP packet format Detailed (Programming)

- CentOS7 virtual machine creation failed Solution (Linux)

- Linux shell script under the use of randomly generated passwords (Programming)

- Log device files under Linux - logger (Linux)

- Linux_Logo - output color ANSI Linux distributions logo command-line tool (Linux)

- Improve the efficiency of Linux development tools 5 (Linux)

- ORA-00824: can not set sga_target due to existing problem-solving (Database)

- SUSE Linux install Oracle 10g and problem solving (Linux)

- Linux Learning Notes: Users and Groups (Linux)

- ORA-38856: Unable instance UNNAMED_INSTANCE_2 (redo thread 2) marked enabled (Database)

- Java String and StringBuffer and StringBuilder Comments (Programming)

- About Linux iptables firewall interview questions and answers (Linux)

- Ubuntu 14.04 LTS installed Hadoop 1.2.1 (distributed cluster mode) (Server)

- Use the dd command to the hard disk I / O performance test (Linux)

- To use Java arrays implement the order form (Programming)

- DOM event handlers add notes (Programming)

- Boost - Memory Management - smart pointers (Programming)

 
         
  Modify Linux SSH default port 22 in several ways
     
  Add Date : 2017-08-31      
         
       
         
  The first:
01 If you want to change the default port Linux SSH (22), then you just modify: / etc / ssh / sshd_config of Port 22, where they have to put 22 into port located on the line, but do not set up and is now Oh the same port, to avoid causing unknown consequences.

02 If you want to restrict SSH login IP, you can do the following:

First: Modify /etc/hosts.deny, added thereto sshd: ALL

Then: Modify: /etc/hosts.allow, in which the following settings: sshd: 192.168.0.241

This can restrict only the IP 192.168.0.241 landing on the LINUX machine via SSH. Of course, as the server side, I do not install gnome and KDE, but not a lot of stuff installed, thus increasing the safety factor.

The second:
First, modify the configuration file
vi / etc / ssh / sshd_config

Find #Port 22 paragraph here is to identify the default port 22, is amended as follows:

Port 22
Port 50000
Then save and exit

Executive /etc/init.d/sshd restart
Such SSH port will work simultaneously with 22 and 50000.

Now edit the firewall configuration: vi / etc / sysconfig / iptables

50000 port is enabled.
Executive /etc/init.d/iptables restart

Now use ssh tool to connect port 50000 to test was successful. If the connection is successful, then re-edit sshd_config settings will delete Port22 inside, you can.

The reason why the first set to the two ports, a port and then turn off the test is successful, is to modify the way in conf process, in case dropped, broken nets, misuse and other unknown time, but also through a different port up commissioning in order to avoid the connection must not send people to the engine room, causing the problem even more complex problems.
     
         
       
         
  More:      
 
- Nginx1.8 version upgrade method AMH4.2 Free manually compile (Server)
- Three kinds of binary tree traversal recursive and iterative solution (Programming)
- Python pickle module for simple use notes (Programming)
- MySQL multi-master-slave synchronization (Database)
- Linux C source code (Ascii HexToBinary: Converts hexadecimal string format ASCII codes) (Programming)
- RabbitMQ tutorial examples: RabbitMQ installation under Windows (Linux)
- JavaScript Advanced Programming notes event capture and event bubbling (Programming)
- C ++ you can become a new scripting language (Programming)
- Unable to start the network after restart clone a virtual machine (Linux)
- CentOS 7.0 Experience with previous versions (Linux)
- Java rewrite the hashcode method (Programming)
- CentOS / Linux NIC set IP address configuration (Linux)
- VMware virtual machine Ubuntu install arm-linux-gcc cross-compiler environment (Linux)
- Oracle 12c of the auto-increment Identity Columns (Database)
- Spring use Cache (Programming)
- Linux System Getting Started Learning: Disable HTTP forwarding wget in (Linux)
- ThinkPad X220 Ubuntu 14.10 installed on fingerprint recognition (Linux)
- Linux6.1 / 6.5 dual-NIC Binding (Linux)
- Convert MySQL date string to a NULL value exception handling (Database)
- PHP generates a random password several ways (Programming)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.