Current location - Quotes Website - Personality signature - How to implement SecureCRT to remotely connect to a Linux server through a key?
How to implement SecureCRT to remotely connect to a Linux server through a key?

Create a key pair locally in the CRT. The configuration in the CRT has the following steps:

1. Open your CRT, click on the tool, and click Create Public Key;< /p>

2. Here is the selection of key type;

3. Although we can no longer authenticate through passwords in the future, if you want to be more secure, you can still add an additional password. If you do not set a phrase, you can leave it blank;

4. The key will be generated by itself, click Next

5. Here I am using the default standard public key and VanDyke private key formats

6. Choose your length according to security requirements. Here I choose the default 1024.

7. After selecting the key length, this option will pop up, because I only configure one connection. , so I chose No

8. Next, we open the Linux system command terminal to implement CRT remote connection and configure the following:

oldman@apache:~$ cd ~? Enter the home directory

oldman@apache:~$ pwd ? View path

/home/oldman

oldman@apache:~$ mkdir .ssh Create .ssh Directory

oldman@apache:~$ ls -la View the list and you can see that .ssh has been created

drwx------? 3 oldman oldman 4096 March? 2 13 :59 .

drwxr-xr-x. 28 root ? root ? 4096 March ? 2 13:52 ..

-rw-r--r-- ? 1 oldman oldman ? 18 Oct 16 21:56 .bash_logout

-rw-r--r-- ? 1 oldman oldman ?176 Oct 16 21:56 .bash_profile

-rw -r--r-- ? 1 oldman oldman ?124 October 16 21:56 .bashrc

drwx------ ? 2 oldman oldman 4096 March ? 2 13:59 .ssh< /p>

oldman@apache:~$ chmod 700 .ssh/ ? Modify the .ssh directory permissions. The permissions must be correct

oldman@apache:~$ ls -ld .ssh/ ?Check it

drwx------ 2 oldman oldman 4096 March? 2 13:59 .ssh/

oldman@apache:~$ cd .ssh/ ?Enter .ssh

oldman@apache:~/.ssh$ rz -y Upload the previous public key file ending in .pub to the server

oldman@apache:~$ ls -ll check< /p>

-rw-r--r-- 1 oldman oldman ?725 March? 9 2015 Identity.pub ?The public key file just now

9. Change the name to the sshd configuration under the server The public key name set in the file is authorized_keys

oldman@apache:~/.ssh$ ssh-keygen -i -f Identity.pub >authorized_keys oldman@apache:~/.ssh$ ll ? Perform Check

-rw------- 1 oldman oldman 1200 March? 2 19:58 authorized_keys

-rw-r--r-- 1 oldman oldman ?725 March? 9 2015 Identity.pub

At this point, the server-side configuration is OK!