ssh 提示 “Permission denied (publickey,gssapi-keyex, ...“

状况描述

使用 ssh SERVER_IP 输入密码会提示 Permission denied, 多次失败后会多输出 (publickey,gssapi-keyex, … 字样

使用 ssh-copy-id SERVER_IP 错误提示类似

解决方法

查看ssh服务器的 sshd_config

# 这项有的Linux版本默认使用的是 prohibit-password
PermitRootLogin yes
# 默认如果是 yes , 不需要管
PasswordAuthentication yes
# 以下这些,如果上面两个配置项都改了还不行
# 再来检查
# UsePAM no
# PubkeyAuthentication yes
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
This error message typically occurs when attempting to authenticate to a remote server using SSH (Secure Shell) and the authentication method specified (publickey, gssapi-keyex, gssapi-with-mic) is not allowed or is not set up correctly. There are several possible reasons for this error, including: 1. Incorrect username or password: Double-check that you are using the correct username and password for the remote server. 2. Incorrect SSH key: If you are using publickey authentication, make sure you have the correct SSH key for the remote server. You may need to generate a new SSH key or update the existing one. 3. Incorrect permissions on the SSH key: Make sure the permissions on the SSH key file are set correctly. The SSH key file should only be readable by the user who owns it. 4. SSH service is not running: Check that the SSH service is running on the remote server. If it is not running, you will not be able to connect using SSH. 5. Firewall blocking SSH traffic: Make sure there is not a firewall blocking SSH traffic to the remote server. You may need to add a firewall rule to allow SSH traffic. To resolve the error, try the following: 1. Verify that you are using the correct username and password for the remote server. 2. Make sure you have the correct SSH key for the remote server. 3. Check the permissions on the SSH key file and ensure that it is only readable by the user who owns it. 4. Verify that the SSH service is running on the remote server. 5. Check if there is a firewall blocking SSH traffic to the remote server and add a firewall rule to allow SSH traffic if necessary.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值