Ssh-keygen with ssh_config password-free login VPS

Source: Internet
Author: User
Tags vps ssh port ssh config ssh config file

ssh-keygen with ssh_config password-free login vpsposted by Fiture/December 29, 2012/"ubuntu""share" used terminal login remote server or VPS of children's shoes have used similar command: SSH [email protected], enter the password can log on to the remote server, but people are always lazy, here, Password-free method to log on to a remote server: Open terminal, locally generate ID_RSA (private key), id_rsa.pub (public key): SSH-keygen-t RSA (press the ENTER key all the way): SSH-the Keygen public key (id_rsa.pub) and private key (ID_RSA) are generated by default in:~/.ssh/directory. Copy the public key to the remote server, or anywhere else WHATEVER...SCP~/.ssh/id_rsa.pub [Email protected]:~/.ssh/the username above is replaced with your username, and the server address. Then you need to log on to your remote server to operate. Log on to the remote server operation SSH [email protected] Enter the password and login, perhaps the last time you logged on to the server requires a password. Cat~/.ssh/id_rsa.pub >> ~/.ssh/Authorized_keys is done, logout if you do not have the operation error, you can enter SSH [email protected] Login server, do not enter the password. Configuring SSH Configtouch~/.ssh/Config Create a new custom SSH config file vim~/.ssh/config with vim or other Editor open config file, configure config, paste the following format content, Save: Host VPS (here is a custom host abbreviation, later connected to the remote server can use the command SSH VPS) user here fill in the username ( such as: root) HostName here to fill the server address can also be a domain name (such as: server.xxoo.com) Port here to fill the server open-SSH Port (default: A) Identityfile Here is the private key file address that was just generated, such as~/.ssh/Id_rsa) In fact, this thing can be used to configure you to connect to different remote servers, such as two GitHub accounts, or two Git servers and so on. It seems that you can now login to the remote server with SSH VPS. have been unable to remember these things, first on this note, for reference only. Ps..sshThe-T in the-keygen command represents the type of makefile, such as RSA,DSA, and so on, and the-c parameter seems to be a comment, provides aNewComment. If you use Ssh-keygen-t rsa-c"comment content, usually e-mail address", the generated public key is followed by comments, for the time being I don't know what to do with it ... More information: http://Www.openbsd.org/cgi-bin/man.cgi?query=ssh-keygenhttp://Www.openbsd.org/cgi-bin/man.cgi?query=ssh_config

Ssh-keygen with ssh_config password-free login VPS

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.