fedora Permission denied (publickey).

本文介绍如何解决SSH 'Permission denied (publickey)'错误,包括修改`ssh_config`配置、使用不同加密类型、处理'nomutualsignaturesupported'报错,并提供关键步骤和配置示例。

ssh, git clone 等报

Permission denied (publickey).

检查目标节点,均加过 key,仍然报错,尝试下面的方法可解决:

方法1:/etc/ssh/ssh_config 添加 下面配置:

Host *
        PubkeyAcceptedKeyTypes=+ssh-rsa

方法2: 使用 ecdsa 等加密方式替代 rsa:

ssh-keygen -t ecdsa -C "<comment>"

将生成的 ~/.ssh/id_ecdsa.pub 公钥 copy 到目标节点,或者 gerrit ssh 配置。

扩展:
“no mutual signature supported”报错
bash~/.ssh/config添加

PubkeyAcceptedKeyTypes +ssh-rsa
[info] Resolving ssh remote authority 'northwest1.gpugeek.com' (Unparsed 'ssh-remote+7b22686f73744e616d65223a226e6f72746877657374312e6770756765656b2e636f6d227d') (attempt #1) [info] SSH askpass server listening on port 52683 [debug] hostname: northwest1.gpugeek.com, remote platform map: {"120.220.95.9":"linux","gpu40.s.acelab.top":"linux","ssh -p 48408 root@northwest1.gpugeek.com":"linux","northwest1.gpugeek.com":"linux"} [info] Using configured platform linux for remote host northwest1.gpugeek.com [debug] hostname: northwest1.gpugeek.com, remote server install map: {} [info] Using askpass script: c:\Users\王晶鑫\.cursor\extensions\anysphere.remote-ssh-1.0.30\dist\scripts\launchSSHAskpass.bat with javascript file c:\Users\王晶鑫\.cursor\extensions\anysphere.remote-ssh-1.0.30\dist\scripts\sshAskClient.js. Askpass handle: 52683 [info] Launching SSH server via shell with command: type "C:\Users\王晶鑫\AppData\Local\Temp\cursor_remote_install_8e94acce-e0e2-4b30-97b7-5dcb5e6e892d.sh" | ssh -T -D 52685 northwest1.gpugeek.com bash --login -c bash [info] Establishing SSH connection: type "C:\Users\王晶鑫\AppData\Local\Temp\cursor_remote_install_8e94acce-e0e2-4b30-97b7-5dcb5e6e892d.sh" | ssh -T -D 52685 northwest1.gpugeek.com bash --login -c bash [info] Started installation script. Waiting for it to finish... [info] Waiting for server to install. Timeout: 30000ms [info] (ssh_tunnel) stderr: CreateProcessW failed error:2 [info] (ssh_tunnel) stderr: ssh_askpass: posix_spawnp: No such file or directory [info] (ssh_tunnel) stderr: Permission denied, please try again. [info] (ssh_tunnel) stderr: CreateProcessW failed error:2 [info] (ssh_tunnel) stderr: ssh_askpass: posix_spawnp: No such file or directory [info] (ssh_tunnel) stderr: Permission denied, please try again. [info] (ssh_tunnel) stderr: CreateProcessW failed error:2 [info] (ssh_tunnel) stderr: ssh_askpass: posix_spawnp: No such file or directory [info] (ssh_tunnel) stderr: root@northwest1.gpugeek.com: Permission denied (publickey,password). [info] (ssh_tunnel) stderr: ������ͼд��Ĺܵ������ڡ� [error] Error installing server: [Error: Failed to connect to the remote SSH host. Please check the logs for more details. at t.installCodeServer (c:\Users\王晶鑫\.cursor\extensions\anysphere.remote-ssh-1.0.30\dist\main.js:2:946843) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async c:\Users\王晶鑫\.cursor\extensions\anysphere.remote-ssh-1.0.30\dist\main.js:2:401945] [info] Deleting local script C:\Users\王晶鑫\AppData\Local\Temp\cursor_remote_install_8e94acce-e0e2-4b30-97b7-5dcb5e6e892d.sh [error] Error resolving SSH authority [Error: Failed to connect to the remote SSH host. Please check the logs for more details. at t.installCodeServer (c:\Users\王晶鑫\.cursor\extensions\anysphere.remote-ssh-1.0.30\dist\main.js:2:946843) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async c:\Users\王晶鑫\.cursor\extensions\anysphere.remote-ssh-1.0.30\dist\main.js:2:401945]
09-17
[info] Resolving ssh remote authority 'one' (Unparsed 'ssh-remote+7b22686f73744e616d65223a226f6e65227d') (attempt #1) [info] SSH askpass server listening on port 53732 [debug] hostname: one, remote platform map: {"one":"linux"} [info] Using configured platform linux for remote host one [debug] hostname: one, remote server install map: {} [debug] hostname: one, server port range map: {} [info] Using askpass script: c:\Users\张洪楷\.cursor\extensions\anysphere.remote-ssh-1.0.34\dist\scripts\launchSSHAskpass.bat with javascript file c:\Users\张洪楷\.cursor\extensions\anysphere.remote-ssh-1.0.34\dist\scripts\sshAskClient.js. Askpass handle: 53732 [info] Launching SSH server via shell with command: type "C:\Users\张洪楷\AppData\Local\Temp\cursor_remote_install_8b84f9f5-7832-42da-ad29-3bfe280cb513.sh" | ssh -T -D 53734 one bash --login -c bash [info] Establishing SSH connection: type "C:\Users\张洪楷\AppData\Local\Temp\cursor_remote_install_8b84f9f5-7832-42da-ad29-3bfe280cb513.sh" | ssh -T -D 53734 one bash --login -c bash [info] Started installation script. Waiting for it to finish... [info] Waiting for server to install. Timeout: 30000ms [info] (ssh_tunnel) stderr: CreateProcessW failed error:2 [info] (ssh_tunnel) stderr: ssh_askpass: posix_spawnp: No such file or directory [info] (ssh_tunnel) stderr: Permission denied, please try again. [info] (ssh_tunnel) stderr: CreateProcessW failed error:2 [info] (ssh_tunnel) stderr: ssh_askpass: posix_spawnp: No such file or directory [info] (ssh_tunnel) stderr: Permission denied, please try again. [info] (ssh_tunnel) stderr: CreateProcessW failed error:2 [info] (ssh_tunnel) stderr: ssh_askpass: posix_spawnp: No such file or directory [info] (ssh_tunnel) stderr: root@10.130.71.2: Permission denied (publickey,password). [info] (ssh_tunnel) stderr: ������ͼд��Ĺܵ������ڡ� [error] Error installing server: [Error: Failed to connect to the remote SSH host. Please check the logs for more details. at t.installCodeServer (c:\Users\张洪楷\.cursor\extensions\anysphere.remote-ssh-1.0.34\dist\main.js:2:951304) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async c:\Users\张洪楷\.cursor\extensions\anysphere.remote-ssh-1.0.34\dist\main.js:2:402760] [info] Deleting local script C:\Users\张洪楷\AppData\Local\Temp\cursor_remote_install_8b84f9f5-7832-42da-ad29-3bfe280cb513.sh [error] Error resolving SSH authority [Error: Failed to connect to the remote SSH host. Please check the logs for more details. at t.installCodeServer (c:\Users\张洪楷\.cursor\extensions\anysphere.remote-ssh-1.0.34\dist\main.js:2:951304) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async c:\Users\张洪楷\.cursor\extensions\anysphere.remote-ssh-1.0.34\dist\main.js:2:402760] 请问如何解决这个问题
最新发布
11-25
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值