首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
社区首页 >问答首页 >Linux服务器拒绝连接

Linux服务器拒绝连接
EN

Server Fault用户
提问于 2018-01-31 09:29:13
回答 1查看 813关注 0票数 0

当试图运行一个五旬节作业时,它失败了,它说:“打开连接到本地主机的用户名五旬节错误!”还有附加的评论:“五旬节用户名身份验证失败!”

所有的工作都是并行运行多个连接并执行一些Linux命令。由于一些奇怪的原因(我不知道),这个工作在超过一定数量的连接(有些成功了,有些没有成功)之后就被杀了。

sshd_config主要具有默认设置,PasswordAuthentication设置为yes

uname -a返回Linux pentahoserver 2.6.32-573.1.1.el6.x86_64 #1 SMP Tue Jul 14 02:46:51 EDT 2015 x86_64 x86_64 x86_64 GNU/Linux

/var/log/secure含量

代码语言:javascript
运行
AI代码解释
复制
Jan 31 17:14:24 pentahoserver sshd[22593]: pam_tally2(sshd:auth): user pentaho (1000) tally 7, deny 6
Jan 31 17:14:24 pentahoserver sshd[22593]: pam_tally2(sshd:auth): user pentaho (1000) tally 8, deny 6
Jan 31 17:14:24 pentahoserver sshd[22582]: Accepted password for pentaho from 127.0.0.1 port 42522 ssh2
Jan 31 17:14:24 pentahoserver sshd[22521]: Accepted password for pentaho from 127.0.0.1 port 42517 ssh2
Jan 31 17:14:24 pentahoserver sshd[22516]: Accepted password for pentaho from 127.0.0.1 port 42515 ssh2
Jan 31 17:14:24 pentahoserver sshd[22582]: pam_unix(sshd:session): session opened for user pentaho by (uid=0)
Jan 31 17:14:24 pentahoserver sshd[22521]: pam_unix(sshd:session): session opened for user pentaho by (uid=0)
Jan 31 17:14:24 pentahoserver sshd[22516]: pam_unix(sshd:session): session opened for user pentaho by (uid=0)
Jan 31 17:14:24 pentahoserver sshd[22788]: Received disconnect from 127.0.0.1: 11: Closed due to user request.
Jan 31 17:14:24 pentahoserver sshd[22786]: Received disconnect from 127.0.0.1: 11: Closed due to user request.
Jan 31 17:14:24 pentahoserver sshd[22516]: pam_unix(sshd:session): session closed for user pentaho
Jan 31 17:14:24 pentahoserver sshd[22521]: pam_unix(sshd:session): session closed for user pentaho
Jan 31 17:14:24 pentahoserver sshd[22866]: Accepted password for pentaho from 127.0.0.1 port 42545 ssh2
Jan 31 17:14:24 pentahoserver sshd[22841]: Accepted password for pentaho from 127.0.0.1 port 42544 ssh2
Jan 31 17:14:24 pentahoserver sshd[22866]: pam_unix(sshd:session): session opened for user pentaho by (uid=0)
Jan 31 17:14:24 pentahoserver sshd[22841]: pam_unix(sshd:session): session opened for user pentaho by (uid=0)
Jan 31 17:14:25 pentahoserver sshd[23037]: Accepted password for pentaho from 127.0.0.1 port 42562 ssh2
Jan 31 17:14:25 pentahoserver sshd[23032]: Accepted password for pentaho from 127.0.0.1 port 42560 ssh2
Jan 31 17:14:25 pentahoserver sshd[23185]: Received disconnect from 127.0.0.1: 11: Closed due to user request.
Jan 31 17:14:25 pentahoserver sshd[22866]: pam_unix(sshd:session): session closed for user pentaho
Jan 31 17:14:25 pentahoserver sshd[23339]: pam_tally2(sshd:auth): user pentaho (1000) tally 7, deny 6
Jan 31 17:14:25 pentahoserver sshd[23117]: pam_tally2(sshd:auth): user pentaho (1000) tally 8, deny 6
Jan 31 17:14:25 pentahoserver sshd[23336]: pam_tally2(sshd:auth): user pentaho (1000) tally 7, deny 6
Jan 31 17:14:25 pentahoserver sshd[23186]: Received disconnect from 127.0.0.1: 11: Closed due to user request.
Jan 31 17:14:25 pentahoserver sshd[23339]: pam_tally2(sshd:auth): user pentaho (1000) tally 8, deny 6
Jan 31 17:14:25 pentahoserver sshd[23338]: pam_tally2(sshd:auth): user pentaho (1000) tally 9, deny 6
Jan 31 17:14:25 pentahoserver sshd[23117]: pam_tally2(sshd:auth): user pentaho (1000) tally 9, deny 6
Jan 31 17:14:25 pentahoserver sshd[23336]: pam_tally2(sshd:auth): user pentaho (1000) tally 10, deny 6
Jan 31 17:14:25 pentahoserver sshd[22841]: pam_unix(sshd:session): session closed for user pentaho
Jan 31 17:14:25 pentahoserver sshd[23178]: Accepted password for pentaho from 127.0.0.1 port 42570 ssh2
Jan 31 17:14:25 pentahoserver sshd[23111]: Accepted password for pentaho from 127.0.0.1 port 42566 ssh2
Jan 31 17:14:25 pentahoserver sshd[23190]: Accepted password for pentaho from 127.0.0.1 port 42571 ssh2
Jan 31 17:14:25 pentahoserver sshd[23337]: Accepted password for pentaho from 127.0.0.1 port 42573 ssh2
Jan 31 17:14:25 pentahoserver sshd[23037]: pam_unix(sshd:session): session opened for user pentaho by (uid=0)
Jan 31 17:14:25 pentahoserver sshd[23032]: pam_unix(sshd:session): session opened for user pentaho by (uid=0)
Jan 31 17:14:25 pentahoserver sshd[23429]: Accepted password for pentaho from 127.0.0.1 port 42583 ssh2
Jan 31 17:14:25 pentahoserver sshd[23190]: pam_unix(sshd:session): session opened for user pentaho by (uid=0)
Jan 31 17:14:25 pentahoserver sshd[23111]: pam_unix(sshd:session): session opened for user pentaho by (uid=0)
Jan 31 17:14:25 pentahoserver sshd[23178]: pam_unix(sshd:session): session opened for user pentaho by (uid=0)
Jan 31 17:14:25 pentahoserver sshd[23337]: pam_unix(sshd:session): session opened for user pentaho by (uid=0)
Jan 31 17:14:25 pentahoserver sshd[23562]: Received disconnect from 127.0.0.1: 11: Closed due to user request.
Jan 31 17:14:25 pentahoserver sshd[23547]: Received disconnect from 127.0.0.1: 11: Closed due to user request.
Jan 31 17:14:25 pentahoserver sshd[23037]: pam_unix(sshd:session): session closed for user pentaho
Jan 31 17:14:25 pentahoserver sshd[23032]: pam_unix(sshd:session): session closed for user pentaho
Jan 31 17:14:25 pentahoserver sshd[23429]: pam_unix(sshd:session): session opened for user pentaho by (uid=0)
Jan 31 17:14:25 pentahoserver sshd[23530]: Accepted password for pentaho from 127.0.0.1 port 42588 ssh2
Jan 31 17:14:25 pentahoserver sshd[23542]: Accepted password for pentaho from 127.0.0.1 port 42589 ssh2
Jan 31 17:14:25 pentahoserver sshd[23530]: pam_unix(sshd:session): session opened for user pentaho by (uid=0)
Jan 31 17:14:25 pentahoserver sshd[23542]: pam_unix(sshd:session): session opened for user pentaho by (uid=0)
Jan 31 17:14:25 pentahoserver sshd[23612]: Received disconnect from 127.0.0.1: 11: Closed due to user request.
Jan 31 17:14:25 pentahoserver sshd[23624]: Received disconnect from 127.0.0.1: 11: Closed due to user request.
Jan 31 17:14:25 pentahoserver sshd[23178]: pam_unix(sshd:session): session closed for user pentaho
Jan 31 17:14:25 pentahoserver sshd[23190]: pam_unix(sshd:session): session closed for user pentaho
Jan 31 17:14:25 pentahoserver sshd[23785]: Received disconnect from 127.0.0.1: 11: Closed due to user request.
Jan 31 17:14:25 pentahoserver sshd[23542]: pam_unix(sshd:session): session closed for user pentaho
Jan 31 17:14:25 pentahoserver sshd[23786]: Received disconnect from 127.0.0.1: 11: Closed due to user request.
Jan 31 17:14:25 pentahoserver sshd[23530]: pam_unix(sshd:session): session closed for user pentaho
Jan 31 17:14:26 pentahoserver sshd[22593]: Failed password for pentaho from 127.0.0.1 port 42523 ssh2
Jan 31 17:14:26 pentahoserver sshd[22599]: Received disconnect from 127.0.0.1: 11: Closed due to user request.
Jan 31 17:14:27 pentahoserver sshd[23117]: Failed password for pentaho from 127.0.0.1 port 42567 ssh2
Jan 31 17:14:27 pentahoserver sshd[23137]: Received disconnect from 127.0.0.1: 11: Closed due to user request.
Jan 31 17:14:27 pentahoserver sshd[23338]: Failed password for pentaho from 127.0.0.1 port 42576 ssh2
Jan 31 17:14:27 pentahoserver sshd[23348]: Received disconnect from 127.0.0.1: 11: Closed due to user request.
Jan 31 17:14:27 pentahoserver sshd[23339]: Failed password for pentaho from 127.0.0.1 port 42577 ssh2
Jan 31 17:14:27 pentahoserver sshd[23351]: Received disconnect from 127.0.0.1: 11: Closed due to user request.
Jan 31 17:14:27 pentahoserver sshd[23336]: Failed password for pentaho from 127.0.0.1 port 42572 ssh2
Jan 31 17:14:27 pentahoserver sshd[23345]: Received disconnect from 127.0.0.1: 11: Closed due to user request.

有人能帮忙吗?

EN

回答 1

Server Fault用户

回答已采纳

发布于 2018-01-31 09:41:07

虽然这并不是对您当前问题的直接回答,但是使用下面描述的方法可以防止您首先遇到这样的问题。

我认为在运行自动作业时使用私钥身份验证是一种更好的做法。

要做到这一点,您需要在您想要的每台机器上生成一个rsa ssh键,然后在运行命令的服务器(我们称之为管理服务器)中生成一个rsa ssh键,然后在管理服务器和ssh客户端机器之间交换密钥。

这将使您可以在不输入密码的情况下从管理服务器到ssh客户端服务器。

除了ssh密钥交换之外,我建议您检查我编写的这个剧本,它包装了"pssh“(并行-ssh)命令,并允许您提供命令--一个server.list文件和一个命令--脚本将在列表中的每个服务器上运行该命令,并为您提供一些关于在每个服务器上运行该命令的结果的有色指示。

此脚本的使用要求您安装pssh,这也可能被称为并行-ssh。

如果您不确定您应该采取哪些步骤,请告诉我,我将帮助您执行这些命令。

票数 0
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/895028

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档
查看详情【社区公告】 技术创作特训营有奖征文