我在我的服务器上安装了gitlab http://gitlab.com/,我一件事都不明白。
每个git服务器的一般建议是用户git没有有效的shell,而不是/bin/bash,而是使用git。但是,不能将此设置为gitlab工作,而是需要/bin/bash作为登录shell。
出于这个原因,我担心用户可以使用使用gitlab上传的密钥将ssh发送到服务器,但它似乎使用了一些魔术,它实际上阻止用户直接登录:
petanb@debian:~$ ssh git@remus
PTY allocation request failed on channel 0
Welcome to GitLab, petr.bena!
Connection to remus closed.我在/home/git、.profile .bashrc和.ssh的内容都检查了git用户的整个文件夹,那么它是如何做到的呢?它如何防止用户使用ssh?那是什么样的ssh钩子?
发布于 2014-06-03 21:59:27
这很可能是因为,在remus服务器上,git用户的. SSH /_文件在SSH公钥之前设置了选项“no”。例如:
no-pty ssh-rsa AAAAB3NzaC1yc2EAA.用户@机
https://stackoverflow.com/questions/23130278
复制相似问题