SSH personal configuration process

Source: Internet
Author: User

The client configuration is as follows:

1. Common Client Connection server code

SSH [email protected]-P port-I id_rsa-P port-I specify the Key Path-V to view the authentication process, debug

You need to configure the file as follows:

The configuration file is not changed. Create it manually.

~ /. Ssh/config

Host 248 hostname 192.168.28.248 User Root port 22 host 50 hostname 192.168.28.50 ### default for all #### override as per host # host * forwardagent no forwardx11 no forwardx11trusted Yes User Username Port protocol 2 serveraliveinterval 60 serveralivecountmax 30
Identityfile ~ /. Ssh/id_rsa

Usage: Enter SSH 50 on the terminal.

2. Set the id_rsa Private Key Permission to 600 and upload the public key to the server.

 

/Etc/ssh/ssh_config configuration file for the client

Port port Protocol 2 sendenv Lang lc_ctype lc_numeric lc_time when using lc_paper lc_name lc_address when using lc_identification lc_all else xmodifiers # sendenv Lang lc_all = en. US.UTF-8 hashknownhosts too many No

 

The server configuration is as follows:

/Etc/ssh/sshd_config configuration file for the server

Port changed to custom port no # acceptenv Lang LC _ * acceptenv Lang lc_ctype lc_numeric lc_time when lc_paper lc_name lc_address when lc_all else xmodifiers # allowgroups sshusedns No
Put the public key in the authorized_keys file under the root directory of the corresponding user on the server. The permission is very important. chmod 700 ~ /. Ssh chmod 600 ~ /. Ssh/authorized_keys

  

Reference: http://www.cyberciti.biz/faq/create-ssh-config-file-on-linux-unix/http://nerderati.com/2011/03/simplify-your-life-with-an-ssh-config-file/http://dhq.me/use-ssh-config-manage-ssh-sessionhttp://hi.baidu.com/linuxtrip/item/3f630717939a86f5746a8427

The above configuration will be updated continuously

1. First release of 2014. 09.14

SSH personal configuration process

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.