Configure SecureCRT to log on to the server using the SSH public key.

Source: Internet
Author: User
Tags password protection

Configure SecureCRT to log on to the server using the SSH public key.

 

To facilitate server management, one function of CRT is very convenient. That is, you can use the private key to authenticate and connect directly, and the password protection is more secure.

First configure ssh

Port 32812
Protocol 2
UseDNS no
PubkeyAuthentication yes
AuthorizedKeysFile. ssh/authorized_keys
PasswordAuthentication no
MaxAuthTries 60

The operation is divided into two parts:

1. linux server operations:

First, generate the public key and private key.

Ssh-keygen-t dsa-f/root /. ssh/'ifconfig eth0 | awk'/inet addr/{print $2} '| awk-F': ''{print $ NF }''. id_dsa-N'-q

###

-T specifies the encryption algorithm

-F specifies the generation path

-Q quiet mode

A public key is generated under/root/. ssh /.

Then grant the permission. id_dsa is the private key and id_dsa.pub is the public key.

The. ssh directory must have 700 permissions.

Download the two files and save them to a directory that stores the Authentication Files. Note: Put both files here.

Rename the public key content to authorized_keys. You can also cat id_dsa.pub> authorized_keys.

2. CRT connection logon.

 

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.