SSH Password-free login permission denied (publickey,gssapi-keyex,gssapi-with-mic) solution!

Source: Internet
Author: User
Tags ssh server

When the permission denied (publickey,gssapi-keyex,gssapi-with-mic) warning appears, congratulate you, you have been very close to the success.

The remote host is set to Slave2 and the user is Hadoop.

Local host set to Slave1

The following are the configurations on the remote host slave2, allowing Slave1 to connect to the Slave2 without a password. If you want to password-free interconnection, the same principle, on the slave1 is also so configured!

(1) First: Configure the SSH server configuration file.

Can be configured under the root user.

Vi/etc/ssh/sshd_config

Find the following three lines

#PermitRootLogin Yes

#UsePAM Yes

#PasswordAuthentication Yes

If there is a # number in front of it, remove the # number and then modify Yes to No.

(2) Restart sshd service

Systemctl Restart Sshd.service

Systemctl Status Sshd.service #查看ssh服务的状态

#systemctl Start Sshd.service #开启ssh服务

#sytemctl enable Sshd.service #ssh服务随开机启动, and a disabled.

#systemctl Stop Sshd.ervice #停止

(3) Modify permissions for folders and files.

#chmod 700/home/hadoop/.ssh

#chmod 644/home/hadoop/.ssh/authorized_keys

(4) test on slave1

SSH slave2

Above is the complete solution to this problem!

Summary: This warning, I think the ultimate reason is the folder and the file read and write permissions issues.

We recommend that you first modify the permissions for/home/hadoop/.ssh and/home/hadoop/.ssh/authorized_keys.

done!

SSH Password-free login permission denied (publickey,gssapi-keyex,gssapi-with-mic) solution!

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.