1. First, generate the public key and private key files on the Linux server. The default storage directory is ~/.ssh. ssh-keygen You can leave the password blank to log in without a password in the future. 2. Copy the private key file to your local computer. scp [email protected]:/root/.ssh/id_rsa ~/.ssh It is best to put the private key file in the ~/.ssh directory. Otherwise, when logging in using ssh, you need to use -i to specify the private key file. 3. The public key file needs to be added to the server's ~/.ssh/authorized_keys file. cat id_rsa.pub >> authorized_keys 4. Modify the configuration file to allow login using a secret key. vim /etc/ssh/sshd_config Just remove the # before the comment. Then restart the Linux ssh service systemctl restart sshd.service Older versions without systemctl need to use service sshd restart You can use ssh [email protected] to log in: The above article about how to configure git bash to log in to Linux through ssh is all I have to share with you. I hope it can give you a reference. I also hope that you will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Detailed installation process of MySQL 8.0 Windows zip package version
>>: ByteDance interview: How to use JS to implement Ajax concurrent request control
Personal implementation screenshots: Install: npm...
1. Flex is the abbreviation of Flexible Box, whic...
MySQL slow query, whose full name is slow query l...
1. If MySQL is not started successfully, check th...
This article shares the specific code for JavaScr...
A simple MySQL full backup script that backs up t...
Table of contents 1. About JavaScript 2. JavaScri...
Preface The method of configuring IP addresses in...
Make a nice flip login and registration interface...
This time let’s look at a navigation bar layout w...
Table of contents 1. Basics of audio playback in ...
Table of contents Memory Pool Overview 1. nginx d...
1: django-admin.py startproject project name 2: c...
Table of contents 1. Introduction to Compose 2. C...