SSH 连接“此帐户当前不可用”

use*_*152 3 login ssh accounts

我尝试以 3 种不同的方式连接 SSH 服务器,但没有任何效果:

  • 使用 putty - 输入密码后,putty 窗口自动关闭,日志文件中显示:“此帐户当前不可用。”

  • 使用Windows powershell - 我收到以下消息:

    Last login: Mon Feb ......
    This account is currently not available.
    Connection to xx.xx closed.
    
    Run Code Online (Sandbox Code Playgroud)
  • 使用Ubuntu终端时,我收到与Windows powershell 相同的消息。

在 Windows 中,我认为我在 sftp 上,但我不知道如何更改为 shell。

我也找到了这个链接,但我在Windows中找不到提到的选项。

Ubuntu中,我的用户处于打开状态/bin/bash

如何解决这个问题呢?

Dop*_*oti 6

您尝试登录的帐户的 shell 很可能已设置为/usr/sbin/nologin,它会输出该文本并返回退出代码1

$ /usr/sbin/nologin
This account is currently not available.
$ echo $?
1
Run Code Online (Sandbox Code Playgroud)

由于这个“shell”不是交互式的,因此当其执行结束时,您的连接会立即关闭。