key login for SSH normal user (non-root user)
This takes the username Zhangsan as an example.
Because of personal habits, I changed the user Zhangsan default directory, in the process of using the key to log in, always prompted to enter the user password, and/var/log/secure also did not have any information,Later in the/etc/passwd the default directory changed
Assume that from a host SSH login B host, with the secret key instead of the password, the steps are as follows:1. Execute on Host A: ssh-keygen-t RSAAll by default, without entering a password, generate two files:/root/.ssh/id_rsa/root/.
When SSH logs on to the remote host in Linux, the public private key authentication method can be done.① Environment Description: Two Linux hosts, host1:192.168.5.1,host2:192.168.5.10. Now set up on host1 and then go to log on to the HOST2 host.② SSH service is turned on automatically by default. You can view the next netstat–nlutp|grepssh in LinuxThis shows that
installation
#ee/etc/inetd.conf
Remove the # in front of the sshd
#ee/etc/rc.conf
Add inetd_enable= "YES"
#kill-hup ' Cat/var/run/inetd.pid '
Then use Putty remote login, always end immediately, failThere's a message from the FreeBSD terminal."May 7 21:38:26 FreeBSD sshd[595]: error:could not loadHost key:/etc/ssh/ssh_host_dsa_key "
Idea put on/etc/ssh
1, download the Git client, for: HTTPS://GIT-SCM.COM/DOWNLOAD/MAC2, open the installation package, you can see the interface at this point is: we need to install the. PKG installation package into the system. After I double-clicked the installation package, the results failed to install successfully. The interface is: Here is a pit, although it is very simple problem, but for beginners sometimes headache. Later, on the internet finally found the reason, because this requires permission, so the d
access, can specify the local private key file, so that the trouble of losing the password every time, and more than every time the password is more secure.This public key can be generated using Putty key generator, download link View official website: http://www.chiark.greenend.org.uk/~sgtatham/putty/ Download.html, if the official website link cannot open, can
The first step is to generate a public/private key pair
Using the SECURECRT tool-> create the public key, the cryptographic algorithm chooses RSA because the RSA algorithm is selected in the sshd configuration file
This step generates two files, the default is identity and Identity.pub, where identity is the key and
By using Ssh-keygen to generate the public key, a new channel geek is established between the two machines.Suppose the local machine is the client and the remote machine is the server.1. Use Ssh-keygen to generate RSA keygen (this will overwrite the previously generated ~/.
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 unique key locally, you can also save this key in your account and include i
Iii. Ssh password-less (key verification) login configurationConfigure host a password-free login to host B method 1) 1. generate an SSH-keygen-t rsa key pair on host a, which is stored in. generate a
First we need to create SSH key, how to create SSH key?? Go to the directory where our local version is located, execute the following statement: "Ssh-keygen-t rsa-c" registers a GitHub mailbox, and then generates the following files in the user's home directory: (note that
I didn't care much about using SSH before. After the installation is not how to configure. Login is also directly with the password. This is not too safe, in fact, it is more troublesome, because each time you have to enter a password. If the public key of the private key is used to authenticate. You can log in directly (provided that the private
privateKey to decrypt and send this random number back to the remote system. Finally, the sshd of the remote system will come to the conclusionWe have a matching private key that allows us to log in.
4. Manufacturing KeyUse the Puttygen of the putty suit to generate the key. The type of key is recommended to select SS
server makes a comparison of the information returned by the client. If the comparison succeeds, the authentication succeeds and the client can log on. If the comparison fails, the authentication fails, and the login verification is continued with other means, such as password verification.
The Certificate verification Interactive logon process shows:Linux Client Demo Login:1. Generate a pair of child keys locally on the client:[Email protected]
In linux, the public/private key is generated to allow putty (ssh) to log on automatically (and ssh to log on automatically using the key in linux). Method 1: Use puttygen.exe. Step 1: generate a key to run puttygen.exe, select th
When you use https://to submit a private item on GitHub, you need to enter your account number and password every time.Like my own notebook, I don't want to enter these every time I push.Then use SSH, which needs to add the notebook's SSH key to the GitHub account.①ssh-keygen-t rsa-c "[Email protected]"Enter an e-mail
$feature _name Write code, commit change Git commit-am "Myfeatureisready" pushes your submission to [emailprotected]git pushorigin $feature _name on the submission page you can view your changes, for example: http://git.oschina.net/oschina/git-osc/commit/ F3DD1C5BAE48FA4244E2595A39E750E5606DD9BE Create a pullrequest you can fork any public project, and when you have modified your fork project, you can submit a pull to the source project request. The author of the project can decide whether to a
ArticleDirectory
Linux Configuration
Windows Configuration
Recently, git is used, and it is inconvenient to enter the password each time. You want to use the SSH key (a mechanism similar to the-I parameter in the SSH command ). Now the problem has been solved. Here we will summarize the problem (from the beginning of the database creation) for
Use SSH login VPS generally use the ip+ port, enter username and password to log in
In order to enhance the security of the VPS, use the public key and the private key way to login VPS
The specific methods are:
Generate key on Linux remote server:ssh-ke
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.