Putty使用公钥认证时,报错:Disconnected: No supported authentication methods available(server sent:public key) 问题的解决

Putty使用公钥认证时,按照常规方法设置,一直报错:Disconnected: No supported authentication methods available (server sent:public key)。

如截图:

找了半天没找到问题出在哪里,sshd的设置一切正常。这个做过多次居然也能错????

最后发现原来是 ~/.ssh/authorized_keys 文件的内容有问题,putty生成的pub文件的格式如下:


---- BEGIN SSH2 PUBLIC KEY ----
Comment: "rsa-key"
AAAAB3NzaC1yc2EAAAABJQAAAQEAvifBFJzxK0PGJVNV9ZdDGOYWvytwnFDKoaZv
Djdt7rEK+zeFzR6eU7ERhOjMPb7GfoFU/1JPwXqSN2p57T4xdtR/Qi9/XAhmQ9SY
XnfA1yNOhHXoQuoCEjOmIbOo+NmZCoKPeBob7fXV8Ar7MmJ0vUpZ+79Usm9lsvQF
zEfI/Q1NuaVoOb7s6CFyj9WcmX7Yzc3cXpIHeFzLfLTFFROohw==
---- END SSH2 PUBLIC KEY ----

而原来设置的都是在一行的格式,所以openssh不支持putty生成的此格式,需要把这些合并成一行即可:

ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAvifBFJzxK0PGJVNV9ZdDGOYWvytwnFDKoaZvDjdt7rEK+zeFzR6eU7ERhOjMPb7GfoFU/1JPwXqSN2p57T4xdtR/Qi9/XAhmQ9SYXnfA1yNOhHXoQuoCEjOmIbOo+NmZCoKPeBob7fXV8Ar7MmJ0vUpZ+79Usm9lsvQFzEfI/1NuaVoOb7s6CFyj9WcmX7Yzc3cXpIHeFzLfLTFFROohw== rsa-key

Putty使用公钥认证时,报错:Disconnected: No supported authentication methods available(server sent:public key) 问题的解决

时间: 2024-10-12 08:26:34

Putty使用公钥认证时,报错:Disconnected: No supported authentication methods available(server sent:public key) 问题的解决的相关文章

Disconnected: No supported authentication methods available (server sent: publickey)

安装Git客户端后,进行PULL时报如下错误 disconnected no supported authentication methods available(server sent: publickey,keyboard interactive)解决方案 因为TortoiseGit和Git的冲突 我们需要把TortoiseGit设置改正如下. 1.找到TortoiseGit -> Settings -> Network 2.将SSH client指向~\Git\usr\bin\ssh.e

TortoiseGit disconnected: no supported authentication methods available(server sent:publickey)

之前一直用命令行,现在想用图形工具,TortoiseGit,安装后遇到错误 TortoiseGit disconnected: no supported authentication methods available(server sent:publickey) 解决方法 因为TortoiseGit和Git的冲突 我们需要把TortoiseGit设置改正如下. 1.找到TortoiseGit -> Settings -> Network 2.将SSH client指向~\Git\bin\ss

disconnected no supported authentication methods available(server sent: publickey,keyboard interae)

安装Git客户端后,进行PULL时报如下错误 disconnected no supported authentication methods available(server sent: publickey,keyboard interactive)解决方案 因为TortoiseGit和Git的冲突 我们需要把TortoiseGit设置改正如下. 1.找到TortoiseGit -> Settings -> Network 2.将SSH client指向~\Git\bin\ssh.exe(G

SSH 登录时出现如下错误:Disconnected:No supported authentication methods available

https://help.aliyun.com/knowledge_detail/41489.html?spm=5176.product25365.2.1.Ufrmmi http://blog.csdn.net/chenyong19870904/article/details/7514003

TortoiseGit disconnected no supported authentication

说明 在windows上用git命令提交到github,报错如下:Disconnected: No supported authentication methods available(server sent: publickey). 附截图 解决方法: 1.TortoiseGit -> Settings –> Network->将SSH client设置成C:\Program Files\Git\usr\bin\ssh.exe 2.修改windows环境变量: GIT_SSH=C:\P

oc调用c++接口时 报错 Undefined symbols for architecture i386:

当在oc中调用c++中的方法时,发现说c++中的方法没定义或是找不到 Undefined symbols for architecture i386: "_desTYData", referenced from:-[TuYoo encryptParametersWithDict:] in libtuyoo.a(TuYoo.o)ld: symbol(s) not found fo 记得c++中的方法定义是要这样定义的 extern"C" { const char *d

WPF加载Winform窗体时 报错:子控件不能为顶级窗体

一.wpf项目中引用WindowsFormsIntegration和System.Windows.Forms 二.Form1.Designer.cs 的 partial class Form1 设置为:public partial class Form1 三.代码如下: XXXX.Form1 Zhuwindow = new XXXX.Form1(); Zhuwindow.TopLevel = false; Zhuwindow.FormBorderStyle = System.Windows.Fo

Swift 给UITableView 写extension 时 报错 does not conform to protocol 'UITableViewDataSource'

那是因为你没有实现 数据源和代理方法 实现下就好了 func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return 0 } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { return UITableViewCell() } Sw

解决 vs2010 联接sql 2005 时 报错未能加载文件或程序集“Microsoft.SqlServer.Management.Sdk.Sfc

http://blogs.msdn.com/b/sqlnativeclient/archive/2008/05/30/sqlncli-msi-for-sql-server-2008.aspx 关键是这位老兄的回复,第三条 DavidDmsVcp - MSFT 6 Mar 2013 9:13 AM # You can find the sqlncli.msi in a SQL Server feature pack: Microsoft SQL Server 2008 SP3 Feature Pa