Mac环境下终端(Terminal)用ssh 连接服务器问题 Received disconnect from 120.55.x.x: 2: Too many authentication failures for root
2016-01-10 16:05
561 查看
由于这台Mac配置git生成公钥后,ssh连接就出现来这个问题
Receiveddisconnectfrom120.55.x.x:2:Toomanyauthenticationfailuresforroot
出现后只需要在ssh后面加上
如果不想每次加-o参数就添加个配置文件(默认没有)~/.ssh/config
回头再pushorigin的时候又出现了这样的问题
gitpushoriginmaster
Warning:PermanentlyaddedtheRSAhostkeyforIPaddress'192.30.252.128'tothelistofknownhosts.
Permissiondenied(publickey).
fatal:Couldnotreadfromremoterepository.
Pleasemakesureyouhavethecorrectaccessrights
andtherepositoryexists.
vi~/.ssh/config
注释掉
gitpushoriginmaster
Countingobjects:3,done.
Deltacompressionusingupto4threads.
Compressingobjects:100%(3/3),done.
Writingobjects:100%(3/3),992bytes|0bytes/s,done.
Total3(delta0),reused0(delta0)
Togit@github.com:l496501043/first.git
d0cff78..8399039master->master
又回去ssh120.55.x.x-lroot
连接不上,继续pushorigin到github也正常
那就接着加参数连接ssh120.55.x.x-lroot-oPubkeyAuthentication=no
Receiveddisconnectfrom120.55.x.x:2:Toomanyauthenticationfailuresforroot
出现后只需要在ssh后面加上
-oPubkeyAuthentication=no这个参数,连接正常。
如果不想每次加-o参数就添加个配置文件(默认没有)~/.ssh/config
PreferredAuthenticationspassword 测试连接正常。 -----------------------------分割线----------------------------------
回头再pushorigin的时候又出现了这样的问题
gitpushoriginmaster
Warning:PermanentlyaddedtheRSAhostkeyforIPaddress'192.30.252.128'tothelistofknownhosts.
Permissiondenied(publickey).
fatal:Couldnotreadfromremoterepository.
Pleasemakesureyouhavethecorrectaccessrights
andtherepositoryexists.
-----------------------------分割线----------------------------------
vi~/.ssh/config
注释掉
#PreferredAuthenticationspassword 提交正常
gitpushoriginmaster
Countingobjects:3,done.
Deltacompressionusingupto4threads.
Compressingobjects:100%(3/3),done.
Writingobjects:100%(3/3),992bytes|0bytes/s,done.
Total3(delta0),reused0(delta0)
Togit@github.com:l496501043/first.git
d0cff78..8399039master->master
-----------------------------分割线----------------------------------
又回去ssh120.55.x.x-lroot
连接不上,继续pushorigin到github也正常
那就接着加参数连接ssh120.55.x.x-lroot-oPubkeyAuthentication=no
-----------------------------分割线----------------------------------
-----------------------------分割线----------------------------------
-----------------------------分割线----------------------------------
相关文章推荐
- mailcore -- Mail port
- cf#338-B - Longtail Hedgehog-dag_dp
- 解决TIME_WAIT过多问题
- 【学习笔记】《STL使用入门教程》第四讲:容器set、函数对象functor与对组pair
- Failed to read schema document 'http://code.alibabatech.com/schema/dubbo/dubbo.xsd'问题解决方法
- zabbix通过sendmail进行邮箱警报
- zabbix通过sendmail进行邮箱警报
- 3172: [Tjoi2013]单词 fail树
- LeetCode:219. Contains Duplicate II
- c++ 友元函数 还是不能访问私有成员。。 http://zhidao.baidu.com/link?url=Ccm5gZvOc733A_YsS2kj-LZsVtdwu6BT3WR97u66jZAZ1
- Android USB Connections Explained: MTP, PTP, and USB Mass Storage
- 安卓学习-谷歌官方文档翻译01-Training-GettingStarted
- LeetCode OJ - Container With Most Water
- <LeetCode OJ> 219. Contains Duplicate II
- Codeforces 615B Longtail Hedgehog (Round #338 (Div. 2) B题)
- Codeforces Round #338 (Div. 2) B. Longtail Hedgehog DP
- int main(int argc,char* argv[])详解
- clang: error: linker command failed with exit code 1 (use -v to see invocation)错误问题
- Codeforces Round #338 (Div. 2) B. Longtail Hedgehog(LIS)
- Codeforces Round #335 (Div. 2) C. Sorting Railway Cars