Putty Key Login Linux

Source: Internet
Author: User

In the work if the root user password leaked, that the consequences are quite serious, in the remote login to Linux as far as possible not to use the root password, using putty Xshell ... Can do this,

Preparation: Putty software (why not Xshell. Wait, because they seem to want money ... ): http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

vmware+centos6.6 can Baidu

Start your experiment: The first step into Linux Vi/etc/sysconfig/network-scripts/ifcfg-eth0

Ontoot setting whether the boot starts

Bootproto set IP to get in a way that has DHCP dynamic static

IPADDR IP Address Gateway gateways DNS1 you know that.

650) this.width=650; "title=" 1.png "src=" Http://s3.51cto.com/wyfs02/M01/5B/37/wKiom1UBoZGT1iFOAAJcvt1liWM167.jpg " alt= "Wkiom1ubozgt1ifoaajcvt1liwm167.jpg"/>

Step Two: Open the folder where you installed the Putty and punch the icon that the red arrow refers to

650) this.width=650; "title=" 2.png "src=" Http://s3.51cto.com/wyfs02/M00/5B/31/wKioL1UBpAnQRcj-AANqt73DTYY509.jpg " alt= "wkiol1ubpanqrcj-aanqt73dtyy509.jpg"/> Step three: Set your virtual machine's IP, session name, save, open from bottom down where the red arrow is pointing

650) this.width=650; "title=" 3.png "src=" Http://s3.51cto.com/wyfs02/M02/5B/31/wKioL1UBpLHCpT_pAAIUltv71UM151.jpg " alt= "Wkiol1ubplhcpt_paaiultv71um151.jpg"/>

Fourth step: After entering in the root home directory in the new. SSH directory in this directory to create new Authorized_keys and modify. SSH permissions for 700,authorized_keys are 600 (why one is 7,001 is 600 because the directory has X permissions)

650) this.width=650; "title=" 4.png "src=" Http://s3.51cto.com/wyfs02/M00/5B/31/wKioL1UBpa7AwcnSAAL82eWMGqs144.jpg " alt= "Wkiol1ubpa7awcnsaal82ewmgqs144.jpg"/>

Fifth step: Go back to the folder where you installed the putty and punch the red arrow to generate the key.

650) this.width=650; "title=" 6.png "src=" Http://s3.51cto.com/wyfs02/M00/5B/37/wKiom1UBpPqwdaqpAAPMK7txUpw831.jpg " alt= "Wkiom1ubppqwdaqpaapmk7txupw831.jpg"/> Sixth step: Punch the red Arrow so the button, and keep shaking the mouse (otherwise very slow)

650) this.width=650; "title=" 7.png "src=" Http://s3.51cto.com/wyfs02/M02/5B/37/wKiom1UBpXLgtXyDAAE7bZ_-dSQ636.jpg " alt= "Wkiom1ubpxlgtxydaae7bz_-dsq636.jpg"/>

Seventh Step: Copy the Public key, set the key password, save the private key

650) this.width=650; "title=" 8.png "src=" Http://s3.51cto.com/wyfs02/M00/5B/37/wKiom1UBpc3CF-1KAALCruRZs0c037.jpg " alt= "Wkiom1ubpc3cf-1kaalcrurzs0c037.jpg"/>

Eighth step: Key generation OK, enter Linux open. SSH directory put the copied public key into Authorized_keys and save

650) this.width=650; "title=" 11.png "src=" http://s3.51cto.com/wyfs02/M00/5B/31/wKioL1UBqEmBpZyvAAH4JX7nfXk595.jpg "alt=" Wkiol1ubqembpzyvaah4jx7nfxk595.jpg "/>

Nineth step: Turn off firewall selinux

650) this.width=650; "title=" 12.png "style=" Float:none; "src=" http://s3.51cto.com/wyfs02/M01/5B/37/wKiom1UBqC_ Trl5faafxz-_uaoo637.jpg "alt=" Wkiom1ubqc_trl5faafxz-_uaoo637.jpg "/>

650) this.width=650; "title=" 13.png "style=" Float:none; "src=" http://s3.51cto.com/wyfs02/M02/5B/31/ Wkiol1ubqvcdlpaoaahv9u0qljo024.jpg "alt=" Wkiol1ubqvcdlpaoaahv9u0qljo024.jpg "/>

Tenth step: Hit a new window select the session just click on the red arrow, complete the Import private key, click Open

650) this.width=650; "title=" 10.png "src=" http://s3.51cto.com/wyfs02/M01/5B/31/wKioL1UBqNWBDqaiAAIjYERasM4298.jpg "alt=" Wkiol1ubqnwbdqaiaaijyerasm4298.jpg "/>

After the call, you can now log in with your key password.

650) this.width=650; "title=" 14.png "src=" http://s3.51cto.com/wyfs02/M00/5B/37/wKiom1UBqOHxCu7FAAEvDw53hcg474.jpg "alt=" Wkiom1ubqohxcu7faaevdw53hcg474.jpg "/>

PostScript: If the server refused our key when logged in is very likely because the problem of the virtual machine caused SELinux has not been killed, then just restart Linux on the landing can be (I tried once)


Putty Key Login Linux

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.