When we ssh to a Linux host, we need to enter the account password. In order to password-free login, we usually use SSH key authentication method. The principle is probably as follows:We want to log in from a host SSH to Host B, usually we generate
Git bash is recommended for SSH generation and authentication1. See if there are any files in the ~/.ssh directory, then skip to step three.$ ls ~/.ssh2. Generate a new SSH key$ ssh-keygen-t rsa-c "[Email protected]"3. Start the SSH proxy (there are
It is a distributed code management tool. Remote code management is based on SSH, so SSH configuration is required to use remote git.
The SSH configuration for GitHub is as follows:
I,
Set git user name and email:
$ git config --global user.name
Create an SSH Key to connect to GitHub or GitLab
When we clone a project from GitHub or GitLab or participate in a project, we need to prove our identity. One possible solution is to add the account name and password to each access, and save a
Tag: gitWhen we clone a project from GitHub or gitlab or participate in a project, we need to prove our identity. One possible solution is to add the account name and password to each access, and save a unique key locally, you can also save this key
MAC SSH Key Login:General Mac If you want to login through SSH key, the general practice, self-generated key pair, the advantage is that they only keep the private key, the public key can be placed any server, if you accept someone else to the
1. See if you already have an SSH key: CD ~/.sshIf there is no key then there will be no such folder, there is a backup to delete2. Survival key:$ssh-keygen-t rsa-c "[Email protected]"You need to change the email address to your own email address,
The advantage of using SSH key to verify GitHub is that you do not need to enter the user name and password each time you submit the code, because, to a certain extent, it has a great impact on efficiency, although this can prevent too many times of
This article is an extension of the previous article, "git-tortoisegit complete configuration Process" , so you need to know about the previous article, of course, you can directly look down, and some of the basic operations
Recently, I have been studying how to automatically log on to linux servers. This article describes how to automatically log on to the ssh key. Update: 2014.3.94: 21PM. after finishing this article last night, I found a complete description of ssh
Reference Source: http://jingyan.baidu.com/article/a65957f4f0acc624e67f9bc1.html
Mode one: The local need to generate a public private key file, Git/github in the new SSH key, the public key is filled in, Jenkins holds the private key.
Mode
First, the experimental environmentThis experiment needs at least two machines, this article uses three machines to explain.
Server
Ip
is the distribution machine
Nfs-server
10.0.0.11
Is
Recently contacted Git, is simply a small white user, so decided to record some things to prepare for a rainy daySystem Environment: Windows1. First download git,http://git-scm.com/download/2. Install git normally3. Build a directory of your own,
For VPS Security, I opened the VPS SSH key login settings, through the Goole search data, the operation was successful. The following is an action record. This assumes that as root, the IP of the VPS is 192.168.0.1
The first step: the creation of a
background:
Not familiar with Linux, the new server centos,1 a gpu,512m memory, would like to use to put something;Dos attack, and then understand the need for SSH key login, but also prohibit the account password log in the way, prohibit the use
First, create SSH key 1. In the client view there is no key CD ~/.ssh The following figure, is not found in the SSH folder, proves that there is no key
2. Enter the password to create the SSH key ssh-keygen-t rsa-c "Your email" RSA is the key
1. Generate a key
> Ssh-keygen-T RSAGenerating public/private RSA key pair.Enter file in which to save the key (/home/username/. Ssh/id_rsa ):Enter passphrase (empty for no passphrase ):Enter same passphrase again:Your identification has been saved
3 generating the SSH public key$ ssh-keygen-t rsa-c "[email protected]"#ssh-keygen-t dsa-c "[Email protected]"# Creates a new SSH key using the provided email generating public/private RSA key pair.Enter file in which to save the key (/HOME/YOU/.SSH/
CentOS 6.6 ssh key password-free Login
Generate a public key and private key file --> import the content of the public key file to the local authentication file, and change the permission --> obtain the private key file for login Test
1. Generate
Here is the build method: 1: Open the terminal input Ssh-keygen and then the system prompts for information such as file save location, three consecutive hit enter, the generated SSH key file is saved in the ~/.ssh/id_rsa.pubcd/users/username/.ssh/
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.