如何判断RSH从SUA发送的用户名?

时间:2009-05-19 20:59:48

标签: rsh sua rshd

我在Windows Vista 64位企业计算机上安装了Subsystem for Unix Applications并下载了应用程序。我试图使用RSH连接到FreeBSD服务器。我想执行的命令是:

rsh host.suffix1.company.com command

host.suffix1.company.com上我的主目录中的.rhosts文件如下所示:

+ myusername
+ mydomain\myusername
+ mydomain/myusername
+ myusername@mydomain
+ +
mycomputer.suffix2 myusername
mycomputer.suffix2 +
mycomputer.suffix2.company.com myusername
mycomputer.suffix2.company.com +

我知道+ +很糟糕,但现在让我们忽略它。当我运行时:

rsh host.suffix1.company.com command

我收到以下错误:

rshd: Login incorrect.

然而,当我跑

rsh -l myusername host.suffix1.company.com command

这完美无瑕。我想知道的是:

  1. 当我没有通过-l?
  2. 指定时,什么是SUA作为用户名发送
  3. 如何更改SUA发送的内容?
  4. 我假设这里SUA正在发送某种形式的mydomain \ myusername,但我想知道我可能需要对rhosts文件做什么其他条目以允许这个以及为什么+ +不允许这个?

1 个答案:

答案 0 :(得分:1)

我猜想在freebsd框中检查syslog(或其他适当的日志?)可以从失败的登录名中找到登录名。在我的linux机器上,我从频繁的ssh攻击中获得了以下几行:

May 19 19:57:40 anton sshd[29795]: Failed password for invalid user mercedes from 124.217.246.181 port 49198 ssh2
May 19 19:57:40 anton sshd[29796]: Received disconnect from 124.217.246.181: 11: Bye Bye
May 19 19:57:45 anton unix_chkpwd[29802]: password check failed for user (games)
May 19 19:57:45 anton sshd[29799]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=ns1.1oasis.net  user=games
May 19 19:57:48 anton sshd[29799]: Failed password for games from 124.217.246.181 port 49956 ssh2

这是来自sshd,但如果rshd不能记录类似的内容我会感到惊讶(虽然它可能默认情况下是关闭的,需要启用)。

对于微软获得的rsh客户端的名称的猜测,我几乎没有想法。传统的unix rsh当然会从/ etc / passwd获取名称,使用getpwent()间接读取它(如果它可能会回退到环境变量LOGNAMEUSER?)。 “myusername”是否存在于c:\ windows \ system \ etc \ passwd(或任何SUA映射为/ etc / passwd)?