No interactive access configuration for Linux ssh

Source: Internet
Author: User
Tags openssl prepare ssh server

Environment prepares two Linux servers:

    1. Prepare an SSH server (System environment CENTOS6.5,IP address 192.168.100.100)

    2. Prepare an SSH client (System environment CENTOS6.5,IP address 192.168.100.101)

1. Check if the SSH package is installed

[Email protected] ~]# Rpm-qa openssh-server OpenSSL
Openssh-server-5.3p1-94.el6.x86_64
Openssl-1.0.1e-15.el6.x86_64

2. Start the SSH service

[[email protected] ~]#/etc/init.d/sshd start

3. Create a key pair

[[email protected] ~]# Ssh-keygen all the way to return

Generating public/private RSA key pair.
Enter file in which to save the key (/ROOT/.SSH/ID_RSA):
Enter passphrase (empty for no passphrase):
Enter same Passphrase again:
Your identification has been saved In/root/.ssh/id_rsa.
Your public key has been saved in/root/.ssh/id_rsa.pub.
The key fingerprint is:
94:89:72:48:48:bb:89:cc:00:af:c0:69:e4:e8:13:5f [email protected]
The key ' s Randomart image is:
+--[RSA 2048]----+
|. O ... |
|*.oo. . o |
|+*o Oeo + |
|         BOOO.O. |
|o=o. S |
|              . |
| |
| |
| |
+-----------------+

4. Copy the public key to the client

[Email protected] ~]# ssh-copy-id-i ssh/id_dsa.pub [email protected]

The authenticity of host ' 192.168.100.101 (192.168.100.101) ' can ' t be established.

RSA key fingerprint is 5d:1b:b2:67:84:23:83:f9:59:3b:bd:91:b5:8f:c2:a9.

Is you sure want to continue connecting (yes/no)? Yes

warning:permanently added ' 192.168.100.101 ' (RSA) to the list of known hosts.

[email protected] ' s password:

Now try logging to the machine, with "ssh" [email protected] ' ", and check in:


. Ssh/authorized_keys


To make sure we haven ' t added extra keys so you weren ' t expecting.


5. Test login, no password to login directly to the client

[[email protected] ~]# ssh [email protected]


6.ssh-copy-id How to use non-22 ports

[Email protected] ~]# ssh-copy-id-i/root/.ssh/id_rsa.pub '-p port number [email protected] '


No interactive access configuration for Linux ssh

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.