所以我终于在办公室搬到了Ubuntu!总的来说,我对从Mac和Windows的移动感到非常满意。大多数问题,我能够修复(图形卡问题),但这一个问题,我似乎修复,但它不断回来。
我使用Filezilla,我有一个自定义SSH配置。我还注意到这种情况也发生在PHPStorm上。我假设FileZilla的修复也会修复PHPStorm。
我的SSH配置是:
# Catch all
Host *
ServerAliveInterval 120
ServerAliveCountMax 30
IdentitiesOnly yes
# Local Dev VM
Host jpCentos devel jp
HostName jpCentos
User adminJeremy
IdentityFile /home/jpsimkins/.ssh/jpCentos
IdentitiesOnly yes
# Local Dev VM Root (added as work-a-round for filezilla)
Host jpCentosRoot jpRoot
HostName jpCentos
User root
IdentityFile /home/jpsimkins/.ssh/jpCentosRoot
IdentitiesOnly yes
# Kyle Dev VM
Host kkCentos kk
HostName kkCentos
User adminJeremy
IdentityFile /home/jpsimkins/.ssh/jpCentos
IdentitiesOnly yes
# Staging Server
Host stagingServer staging stage
HostName 10.1.1.120
User adminJeremy
IdentityFile /home/jpsimkins/.ssh/StagingServer
IdentitiesOnly yes
# OlympusatV2 PRODuction Server
Host olympusatV2 v2 live prod
HostName 166.78.xxx.xxx
User adminJeremy
IdentityFile /home/jpsimkins/.ssh/OlympusatV2
IdentitiesOnly yes
# OlympusatV2 PRODuction Server Root User (added as work-a-round for filezilla)
Host olympusatV2Root v2Root v2root liveroot prodRoot prodroot
HostName 166.78.xxx.xxx
User root
IdentityFile /home/jpsimkins/.ssh/OlympusatV2Root
IdentitiesOnly yes
# ParablesServer
Host parablesServer ps
HostName 162.242.xxx.xxx
User adminJeremy
IdentityFile /home/jpsimkins/.ssh/ParablesServer
IdentitiesOnly yes
# ParablesServerRoot (added as work-a-round for filezilla)
Host parablesServerRoot psRoot psroot ParablesServerRoot
HostName 162.242.xxx.xxx
User root
IdentityFile /home/jpsimkins/.ssh/ParablesServerRoot
IdentitiesOnly yes
HostName的名称映射到我的.hosts文件中。这使得当我在办公室之间移动时更新it变得更容易了。应该注意的是,即使我使用IP代替.hosts文件别名,问题也是一样的。
我的问题是,每次我尝试将SFTP发送到服务器时,我都会得到:
Command: open "root@10.1.1.69" 22
Error: Server sent disconnect message
Error: type 2 (protocol error):
Error: "Too many authentication failures for root"
Error: Could not connect to server
Filezilla的详细说明:
Status: Connecting to 10.1.1.69...
Trace: Going to execute /usr/bin/fzsftp
Response: fzSftp started
Trace: CSftpControlSocket::ConnectParseResponse(fzSftp started)
Trace: CSftpControlSocket::SendNextCommand()
Trace: CSftpControlSocket::ConnectSend()
Command: open "root@10.1.1.69" 22
Trace: Server version: SSH-2.0-OpenSSH_5.3
Trace: Using SSH protocol version 2
Trace: We claim version: SSH-2.0-PuTTY_Local:_Sep_14_2013_01:12:43
Trace: Doing Diffie-Hellman group exchange
Trace: Doing Diffie-Hellman key exchange with hash SHA-256
Trace: Host key fingerprint is:
Trace: ssh-rsa 2048 ae:7c:66:41:8d:5a:18:53:ea:ca:ac:0a:ce:27:cc:4d
Trace: Initialised AES-256 SDCTR client->server encryption
Trace: Initialised HMAC-SHA1 client->server MAC algorithm
Trace: Initialised AES-256 SDCTR server->client encryption
Trace: Initialised HMAC-SHA1 server->client MAC algorithm
Trace: Pageant is running. Requesting keys.
Trace: Pageant has 10 SSH-2 keys
Trace: Trying Pageant key #0
Trace: Server refused public key
Trace: Trying Pageant key #1
Trace: Server refused public key
Trace: Trying Pageant key #2
Trace: CSftpControlSocket::ResetOperation(66)
Trace: CControlSocket::ResetOperation(66)
Error: Could not connect to server
Status: Waiting to retry...
Status: Connecting to 10.1.1.69...
Trace: Going to execute /usr/bin/fzsftp
Response: fzSftp started
Trace: CSftpControlSocket::ConnectParseResponse(fzSftp started)
Trace: CSftpControlSocket::SendNextCommand()
Trace: CSftpControlSocket::ConnectSend()
Command: open "root@10.1.1.69" 22
Trace: Server version: SSH-2.0-OpenSSH_5.3
Trace: Using SSH protocol version 2
Trace: We claim version: SSH-2.0-PuTTY_Local:_Sep_14_2013_01:12:43
Trace: Doing Diffie-Hellman group exchange
Trace: Doing Diffie-Hellman key exchange with hash SHA-256
Trace: CSftpControlSocket::ResetOperation(66)
Trace: CControlSocket::ResetOperation(66)
Error: Could not connect to server
当我通过终端机时,我没有问题。
我在某个地方读到:
ssh-add -k ~/.ssh/KEYNAME
会解决这个问题(我不能百分之百确定这是否是修复方法,上周我尝试了很多不同的东西),但似乎在我重新启动机器之后,它又开始发生了。因此,自然地,我试图再次运行命令,但没有骰子。
我对这些东西并不熟悉,但是从日志上看,它似乎正在尝试使用所有的密钥进行身份验证,尽管我正在告诉SSH使用IdentitiesOnly
我删除了~/.putty
,就像我以前看到的那样,但是我仍然会遇到同样的错误(在接受指纹之后)。
任何帮助、想法或建议都会受到欢迎。我在网上搜索,找不到任何东西,所以如果这是dup,请告诉我。
谢谢
发布于 2014-12-11 10:38:37
您可以通过以下方式在Mac上解决此问题:
setting the root password with "sudo passwd root" then
editing and saving the ssh config file with "nano /etc/ssh_config" and
changing the RSAAuthentication to "no" rather than yes.
如果您还有其他问题,请使用以下链接:https://serverfault.com/questions/36291/how-to-recover-from-too-many-authentication-failures-for-user-root
发布于 2016-12-11 13:30:45
中的键进行连接
我也遇到了同样的麻烦。在对FileZilla日志进行了一些分析之后(可以通过在Edit > Preferences > debug中设置调试级别=3来启用调试日志),我注意到,对于每次试图对服务器进行身份验证的失败尝试,都要打印行filezilla Trying Pageant key #
。
5次尝试失败后,它断开打印“太多身份验证失败”错误。
解决方案:把钥匙移到其他地方。
FileZilla使用Pageant机制并尝试使用已存储在.ssh目录中的密钥进行身份验证。我在.ssh目录中存储了一些键,以连接到本地VM。我只需将所有键移动到.ssh中的子目录。我试着重新连接,然后FileZilla正常工作。
发布于 2014-12-11 11:19:28
跟踪日志有一行:
选美比赛开始了。要钥匙。选美有10个SSH-2键
sshd_config (在服务器上)具有一个设置MaxAuthTries
,该设置具有default
值6
因此,为了防止每个连接的身份验证尝试过多,我们需要降低ssh-键/标识。
~/.ssh/config
中~/.ssh/*
中未使用的键移动到一个新的子目录(例如:~/..ssh/sftp-key)ssh-add -D
从代理中删除所有标识。ssh-add ~/ssh/sftp-keys/serverid_rsa
的标识试着重新连接。
如果仍然没有成功,请重新粘贴新的跟踪日志。
https://askubuntu.com/questions/555381
复制相似问题