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) 问题的解决的更多相关文章

  1. TortoiseGit做push时提示Disconnected: No supported authentication methods available (server sent: publickey)错误

    通过Git从远程服务器上获得到自己的项目,但是通过TortoiseGit做push时提示Disconnected: No supported authentication methods availa ...

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

    安装Git客户端后,进行PULL时报如下错误 disconnected no supported authentication methods available(server sent: publi ...

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

    之前一直用命令行,现在想用图形工具,TortoiseGit,安装后遇到错误 TortoiseGit disconnected: no supported authentication methods ...

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

    因为乌龟Git和Git的冲突 我们需要把乌龟Git设置改正如下. 找到TortoiseGit -> Settings -> Network 将SSH client指向~\Git\bin\s ...

  5. tortoisegit 常见错误disconnected no supported authentication methods available(server sent: publickey)

    按如图操作 如果不能应用,Enable Proxy Server选中,再点击下面的应用及确定. 操作完上一部,用tortoisegit 下拉一次(git pull),即可解决

  6. tortoisegit错误: disconnected - no supported authentication methods available(server sent: publickey)

    修改小乌龟的 SSH客户端:

  7. git Disconnected:No supported authentication methods available问题解决

    在本地克隆gitlab上的项目,报如下错误:Disconnected:No supported authentication methods available(server sent:publick ...

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

    SSH 登录时出现如下错误:Disconnected:No supported authentication methods available 更新时间:2017-06-07 13:26:11   ...

  9. puttdy连接服务器报错No supported authentication methods available (server sent:publickey,gassapi-keyex,gassapi-with-mic)

    No supported authentication methods available (server sent:publickey,gassapi-keyex,gassapi-with-mic) ...

随机推荐

  1. 初识KMP

    KMP简介 KMP是一种由Knuth(D.E.Knuth).Morris(J.H.Morris)和Pratt(V.R.Pratt)设计的字符串匹配算法.对目标串T[0:n-1]中查找与之匹配的模式串P ...

  2. Wordpress更换主题之后出错

    今天吃完午饭,休息休息,最近搞了一下google adsense,不过最终的审核没通过,我想会不会是界面不好看呢,饭后就在电脑旁,更换了几个wordpress主题,我的博客使用wordpress搭建的 ...

  3. jira汉化

    https://translations.atlassian.com/dashboard/dashboard 下载汉化jar文件,在jira中上传插件,系统设置中文即可 LOFTER:我们的故事    ...

  4. js中的this指向

    1, 指向window 全局变量 alert(this) //返回 [object Window] 全局函数 function sayHello(){ alert(this); } sayHello( ...

  5. 如何在jQuery中使用 setInterval,setTimeout

    当遇到setInterval,setTimeout与jquery混用的问题 时,直接按JavaScript中的语法写并不起作用,有以下两种解决方法. 方法1. 直接在ready中调用其他方法,会提示缺 ...

  6. CSS样式中,background-image 背景图片居中显示并且在不同屏幕分辨率下始终居中

    body {   margin-top:0px; margin-right:0px;   margin-bottom:0px;   margin-left:0px;   background-colo ...

  7. Python Challenge 过关心得(1)

    正式开始第1关,这一关的URL的特殊部分是map. 这关的图片上有一个本子,上面写着K→M,O→Q,E→G,稍微思索就能发现这几个字母都是按照字母表的顺序向后移动了两位,那么最投机取巧的方法就是把ma ...

  8. abiword Namespace List

    abiword Namespace List Here is a list of all namespaces with brief descriptions: abicollab  这个命名空间以及 ...

  9. java设计模式--创建模式--原型模式

    原型模式: 原型模式 概述 用原型实例指定创建对象的种类,并且通过拷贝这些原型创建新的对象. 适用性 .当一个系统应该独立于它的产品创建.构成和表示时. .当要实例化的类是在运行时刻指定时,例如,通过 ...

  10. Valid Palindrome 解答

    Question Given a string, determine if it is a palindrome, considering only alphanumeric characters a ...