Home IT Linux Windows Database Network Programming Server Mobile  
  Home \ Linux \ Modify Linux SSH default port 22 in several ways     - Install Krita 2.8 on Ubuntu 13.10 / 12.04 / 12.10 (Linux)

- Docker: installation under Ubuntu (Server)

- LMMS 1.03 install on Ubuntu 14.04 (Linux)

- php security study (Linux)

- Perl loop (Programming)

- Linux Mint under tty.js Installation Guide (Linux)

- Taught you how to install Ubuntu Linux (Linux)

- Minimum period string problem (Programming)

- DB2 manually create a library (Database)

- Linux file time Comments ctime mtime atime (Linux)

- To install OwnCloud 7.0.4 under Ubuntu (Linux)

- Linux hard drive failure Case Studies (Linux)

- Zend Studio PHP syntax color scheme to export (Linux)

- Source encountered problems and solutions when installing SaltStack (Server)

- How to convert images, audio and video formats on Ubuntu (Linux)

- CentOS 6.5 three ways to configure the IP address (Linux)

- SME Linux network security policy server security (Linux)

- Turning off the interface eth0: error: Disconnect the device 'eth0' (Linux)

- Linux System Getting Started Learning: Using yum to download the RPM package without installing (Linux)

- Git 2.5 increase in the working tree, triangle improved workflow performance (Linux)

  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:

This can restrict only the IP 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.
- Using Lua implement various operations list (Programming)
- Varnish achieve page jump (Server)
- MySQL how to export files with the date format (Database)
- Security Features Linux and Unix operating system, programming (Linux)
- Android Launcher3 Application List Modify a transparent background (Linux)
- Ora-00600 [fast hot Atkins soft _ that _ Oh, of course not _less_ profile] (Database)
- Installation and configuration of phpMyAdmin under CentOS (Database)
- Install Debian Linux with R on the Android system (Linux)
- CentOS7 set boot directly into the command line interface (Linux)
- Gentoo: startx appeared Failed to load module Problem Solving (Linux)
- Ubuntu PPA install SMPlayer 14.9 (Linux)
- Let MySQL 5.6 support Emoji expression (Database)
- Sublime Text 3 (Linux)
- CentOS7 complete step to install Hadoop2.7 (Server)
- Installation Flow N Play- interface stylized video player on Ubuntu (Linux)
- To install Scribus 1.4.4 under ubuntu (Linux)
- Using IPFilter bridge filter in the FreeBSD system (Linux)
- React Getting Started Tutorial (Linux)
- 20 Advanced Java interview questions summary (Programming)
- Java eight new features 8 (Programming)
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.