标签:emctl linu 启用 miss perm root alt ssh服务器 gen
------------------------------------------------------------------------------------------------------------------------
当出现Permission denied (publickey,gssapi-keyex,gssapi-with-mic) 警告的时候,恭喜你,你已经离成功很近了。
(1)首先:配置ssh服务器配置文件。
在root 用户下才能配置。
vi /etc/ssh/sshd_config
权限设为no:
#PermitRootLogin yes
#UsePAM yes
#PasswordAuthentication yes
如果前面有# 号,将#号去掉,之后将yes修改为no。
修改之后为:
PermitRootLogin no
UsePAM no
PasswordAuthentication no
权限设为yes:
RSAAuthentication yes
PubkeyAuthentication yes
(2)重启sshd服务
systemctl restart sshd.service
systemctl status sshd.service #查看ssh服务的状态
#systemctl start sshd.service #开启ssh服务
#sytemctl enable sshd.service #ssh服务随开机启动,还有个disabled
#systemctl stop sshd.ervice #停止
正常情况下应该是Active:active(running)
(3)修改文件夹以及文件的权限。
#chmod 700 /home/Hadoop/.ssh
#chmod 644 /home/Hadoop/.ssh/authorized_keys
--------------------------------------------------------------------------------------------------------------------------------------
三步到位
ssh-keygen 回车
ssh-copy-id -i /home/sfapp/.ssh/id_rsa.pub sfapp@10.202.107.28
ssh-copy-id -i /home/sfapp/.ssh/id_rsa.pub sfapp@10.202.107.211
ssh sfapp@10.202.107.28
ssh sfapp@10.202.107.211
标签:emctl linu 启用 miss perm root alt ssh服务器 gen
原文地址:https://www.cnblogs.com/xinfang520/p/10281484.html