Remote login with Xshell Key Management Server

Source: Internet
Author: User

1. Generate the public key (Pubic key) with the private key (private key):

Xshell comes with the User Key Generation Wizard, as shown in: Click the menu bar tools, new user key Generation wizard

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/3C/CF/wKiom1PDZ5eQ_NIYAAGj1hpcn1g426.jpg "title=" TP ' g[5 }GZL%4T) 2og8on3uh.jpg "alt=" Wkiom1pdz5eq_niyaagj1hpcn1g426.jpg "/>

Although the RSA and DSA algorithms are available in the SSH2 protocol, we generally choose the RSA key type for insurance purposes, so that the SSH protocol you use is SSH1 or SSH2, and the key length is 1024 bits

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/3C/CF/wKioL1PDaF-wAPBCAAGmdG6DOus851.jpg "title=" $MZ (DP %G ([zcm% (05EH@_RE.jpg "alt=" Wkiol1pdaf-wapbcaagmdg6dous851.jpg "/>

Generating key, directly next

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/3C/CF/wKiom1PDaPnBYcHPAAHkZv3ZUk8311.jpg "title=" $2~~_ ( CUKRWOTQ7 (SN} ' dro.jpg "alt=" Wkiom1pdapnbychpaahkzv3zuk8311.jpg "/>

The key name can be filled in, but generally we'd better be the default name _ years and days, so as to facilitate future management; Generally does not need to fill in the key password, fill in the words is the key plus password double authentication, more secure.

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/3C/D0/wKioL1PDaibzNc34AAF97UYJM2E027.jpg "title=" KFK) Nenw7wz0h0rifmbhhpi.jpg "alt=" Wkiol1pdaibznc34aaf97uyjm2e027.jpg "/>

Public key format default SSH-OPENSSH can, here click Save As file, select a path

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/3C/D0/wKiom1PDa0XjCWstAAHuamNoLTE176.jpg "title=" 2e0{ UHO4X%EJH4IMW (8xovj.jpg "alt=" Wkiom1pda0xjcwstaahuamnolte176.jpg "/>

The file name defaults to

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/3C/D0/wKioL1PDa_3AR7MbAAGKbtHhs-Y144.jpg "title=" ~u5$[_ 6s]ee8wk (21V ' MJ (u.jpg "alt=" Wkiol1pda_3ar7mbaagkbthhs-y144.jpg "/>

A window of the user's key pops up, Xshell has automatically imported the private key I just generated, and the public key has been saved on the desktop (the file path you just selected).

If the above window does not pop up, you can select the user Key Manager----the menu bar tool, which opens the User key window.

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/3C/ED/wKioL1PDjNLip35VAADw3tXeW8o180.jpg "title=" YF) c_ 9zcobp%u~) {ho[(5ak.jpg "alt=" Wkiol1pdjnlip35vaadw3txew8o180.jpg "/>

Select the private key that you just generated, click the Export button on the right, if you change the computer or reinstall the system, re-import the private key.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/3C/D0/wKiom1PDbi3hlfYHAAEOH5XFlaM674.jpg "title=" Jdsd7d55h8olo~6b]snfbtr.jpg "alt=" Wkiom1pdbi3hlfyhaaeoh5xflam674.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/3C/D0/wKiom1PDbmuyc4NcAAFIUpcQ-2I755.jpg "title=" 5E9) Wjq}c} (ira0w[d ' m5pl.jpg "alt=" Wkiom1pdbmuyc4ncaafiupcq-2i755.jpg "/>

If you have previously filled out the key management password, you will be prompted to enter the password.

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/3C/D3/wKioL1PDbrOiK24SAAC2VxRGhM8414.jpg "title=" 2n~ Mcsytkwzm%5@b7q@_g5d.jpg "alt=" Wkiol1pdbroik24saac2vxrghm8414.jpg "/>



2. Add the public key (Pubic key) to the remote Linux server;

Use Xftp to upload id_rsa_1024_20140305.pub to the user's home directory under. SSH (if not, create this directory) and named: Authorized_keys, and then modify the permission to 600.

123 mkdir -/root/.ssh mv /root/id_rsa_1024_20140305.pub /root/.ssh/authorized_keys chmod 600/root/.ssh/authorized_keys



650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/3C/D4/wKioL1PDcguzLSQ9AAQz8adZdT4665.jpg "title=" T ' P (6] J3h3l[h_zy_kez1 ' v.jpg "alt=" wkiol1pdcguzlsq9aaqz8adzdt4665.jpg "width=" 650 "/>650) this.width=650;" src= "http:// S3.51cto.com/wyfs02/m00/3c/d4/wkiol1pdcxuiq6dmaacr9aufwxo105.jpg "title=" 53tav~0xg8) K@O21R$CUJLK.jpg "alt=" Wkiol1pdcxuiq6dmaacr9aufwxo105.jpg "/>


Modifying the Sshd_config configuration file

Vim/etc/ssh/sshd_config

1234 PubkeyAuthentication yes    #启用公告密钥配对认证方式 AuthorizedKeysFile .ssh/authorized_keys     #设定PublicKey文件路径RSAAuthentication yes  #允许RSA密钥PasswordAuthentication no #禁止密码验证登录,如果启用的话,RSA认证登录就没有意义了

Reload sshd service:/etc/init.d/sshd restart



3. Client-mounted private key login:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/3C/EC/wKiom1PDh-rRY7gdAAJzQN0_YIY526.jpg "title=" gnh8nvebe$ @QH]23hc9}719.jpg "alt=" Wkiom1pdh-rry7gdaajzqn0_yiy526.jpg "/>

Note:

Private key, also called user key in Xshell

Public key, also called the host key in Xshell.

"The selected user key is not registered on the remote host. Please try again. " in the login is Xshell error, check the server's SELinux and iptables is open."


This article is from the creator think blog, so be sure to keep this source http://strongit.blog.51cto.com/10020534/1653096

Remote login with Xshell Key Management Server

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.