Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux 无法ssh到锁定的用户_Linux_Ssh_Capistrano - Fatal编程技术网

Linux 无法ssh到锁定的用户

Linux 无法ssh到锁定的用户,linux,ssh,capistrano,Linux,Ssh,Capistrano,我正在遵循Capistrano()的安装指南。但是,我发现我无法通过ssh将锁定的用户('deploy')连接到计算机。我检查了/var/log/auth.log,它说: sshd[29163]: User deploy not allowed because account is locked sshd[29163]: input_userauth_request: invalid user deploy [preauth] -l, --lock Lock the passwo

我正在遵循Capistrano()的安装指南。但是,我发现我无法通过ssh将锁定的用户('deploy')连接到计算机。我检查了
/var/log/auth.log
,它说:

sshd[29163]: User deploy not allowed because account is locked
sshd[29163]: input_userauth_request: invalid user deploy [preauth]
-l, --lock
       Lock the password of the named account. This option disables a password by changing it to a value which matches no possible encrypted value (it adds a ´!´ at the
       beginning of the password).

       Note that this does not disable the account. The user may still be able to login using another authentication token (e.g. an SSH key). To disable the account,
       administrators should use usermod --expiredate 1 (this set the account's expire date to Jan 2, 1970).

       Users with a locked password are not allowed to change their password.
在我使用
passwd-u deploy
解锁用户后,我可以通过ssh连接到计算机中

我查看了passwd的手册页,上面写着:

sshd[29163]: User deploy not allowed because account is locked
sshd[29163]: input_userauth_request: invalid user deploy [preauth]
-l, --lock
       Lock the password of the named account. This option disables a password by changing it to a value which matches no possible encrypted value (it adds a ´!´ at the
       beginning of the password).

       Note that this does not disable the account. The user may still be able to login using another authentication token (e.g. an SSH key). To disable the account,
       administrators should use usermod --expiredate 1 (this set the account's expire date to Jan 2, 1970).

       Users with a locked password are not allowed to change their password.

请注意,这并没有禁用帐户。用户可能仍然可以使用另一个身份验证令牌(例如SSH密钥)登录。”似乎我应该能够在锁定用户的情况下通过SSH登录到计算机,但这不是我看到的。有人知道为什么吗?我正在运行Ubuntu12.04.4 LTS。

手册页上说的不是您将能够使用SSH登录到锁定的帐户。手册页所说的是,如果您为帐户的非密码登录设置了SSH密钥,那么在密码被锁定时,这种登录可能仍然有效,因为SSH密钥登录使用SSH密钥而不是密码作为身份验证令牌,绕过了可能失败的密码身份验证步骤


然而,即使使用非密码登录,它也只是说它可以工作。验证过程部分由PAM控制/管理,因此,如果您设置了SSH密钥,并且只要“部署”用户有有效密码,您就可以不用密码登录到“部署”用户,并且在密码被锁定时无法登录到“部署”用户,请查看您的PAM配置。

在Ubuntu中,如果您的用户根本没有密码,可能会被锁定。设置一个确实为我解决了好几次问题