Client password-free logon to the SSH server

Source: Internet
Author: User

We often need to log on to the Unix/Linux System Using SSH, and use SCP to transmit data. We always need to enter a password. Isn't it annoying?
SSH supports multiple login authentication methods. The default mode is keyboard-interactive, that is, the one that manually enters the password. In practical applications, you sometimes need to log on to the SSH server without a password. For example, Mpi jobs need to use SCP to transmit data between WNs (non-interactive mode ). In this case, public key authentication is required and passphrase is set to be empty for password-free login.

Assume that you need to log on to host B (SSH server) from host a (client) without a password. The specific configuration is as follows:
1. HOST

* Cd ~ /. SSH
* Generate a public key file and a private key file. The types include DSA, RSA, and rsa1. (If you are sure, use either of them)
Ssh-keygen-T DSA
Ssh-keygen-T RSA
Ssh-keygen-T rsa1
* Cat *. Pub> authorized_keys_client
* SCP authorized_keys_client B :~ /. Ssh/

2. Host B

* Put the client's public key into the server's Trust List
Cd ~ /. SSH
Cat authorized_keys_client> authorized_keys
* Update permissions (important)
Chmod 0600 *

In this way, you do not need to enter the password to log on to host B from host a through SSH. Multiple users can repeat the preceding steps.

(Liu aigui/aiguille. Liu, 2008-03-28)

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.