Ssh password-free logon command line

Source: Internet
Author: User
Ssh password-free logon command line 1. Use ssh-keygen-trsa to generate the private key and public key ssh-keygen-b1024-tdsaGeneratingpublic/privatedsakeypair. Enterfileinwhichtosavethekey (/home/user/. ssh /...
Ssh password-free logon command line 1. Use ssh-keygen-t rsa to generate the private key and public key ssh-keygen-B 1024-t dsa Generating public/private dsa key pair. enter file in which to save the key (/home/user /. ssh/id_dsa):/home/user /. ssh/id_dsa Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in/home/user /. ssh/id_rsa. your public key has been saved in/home/user /. ssh/id_ras.pub. www.2cto. c Om 2. key distribution: place the private key on your machine ~ /. Ssh/directory and ensure that the access permission is "-rw -------" (that is, 600 ). Then place the generated public key on the remote host to be connected ~ The/. ssh/directory is renamed as authorized_keys, and the file is not authorized to be modified except for the owner. Command cd ~ /. Ssh-copy-id user @ IP or ssh-copy-id-I id_rsa.pub user @ IP 3. log on to ssh username @ ip and log on directly. 4. run the command ssh user @ ip. /test. sh normal user ssh connection to linux server is always prompted: ulimit: open files: cannot modify limit: Operation not permitted solution: vi/etc/security/limits. add conf: www.2cto.com * soft nofile 65535 * hard nofile 65535 if you cannot log on, delete/home/user /. ssh/known_hosts file and try again
Related Article

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.