Configuration of SSH server remote login

Source: Internet
Author: User

configuration of SSH server remote login

    1. service startup file location for SSH service:

#ls –l/etc/init.d/sshd

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/6F/5A/wKioL1WaF-CR5Qo9AACqPnB23ME543.jpg "title=" The service startup file location for the SSH service. png "alt=" wkiol1waf-cr5qo9aacqpnb23me543.jpg "/>


    1. View the process of the SSH service

#ps –ef |grep sshd

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6F/5A/wKioL1WaF_-hNEaWAAEobQRcE7w361.jpg "title=" View the process of SSH. png "alt=" wkiol1waf_-hneawaaeobqrce7w361.jpg "/>


    1. configuration file location for Ssh service

#ll/etc/ssh/sshd_config//ssh_config is a Linux client file

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6F/5C/wKiom1WaFkaQ3ik5AACoLlDvtHM981.jpg "title=" View the location of the SSH configuration file. png "alt=" wkiom1wafkaq3ik5aacolldvthm981.jpg "/>

4. to back up a file before you modify it

#cd/etc/ssh

#cp Sshd_config sshd_config.cuilong.20150706

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6F/5A/wKioL1WaGCWzz20NAACng2jy3nA198.jpg "title=" Back up sshd _config.png "alt=" Wkiol1wagcwzz20naacng2jy3na198.jpg "/>

    1. Modify The sshd_config file

#vim sshd_config :set nu// displays line number

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/6F/5A/wKioL1WaGDPgWS1BAABG0tsXHLk779.jpg "title=" Modify the configuration file. png "alt=" wkiol1wagdpgws1baabg0tsxhlk779.jpg "/>

The contents of the modification are:

(1) in line port 52113// Change the remote port number to 52113, default is 22

(2) on line listenaddress 192.168.127.128// change to Linux intranet IP address

(3) Permitrootlogin no//root management in the line can not telnet

(4) on 122 line Usedns No

(5) Gssapiauthentication no in the line

6. After the modification is complete,: Wq Save, with diff can compare, or Vimdiff

#diff Sshd_config sshd_config.cuilong.20150706

# Vimdiff Sshd_config sshd_config.cuilong.20150706


7. Restart the SSH service

#/etc/init.d/ssh restart


Configuration of SSH server remote login

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.