在设置 Git 服务器(在最新的 Debian 上)时,我将 git 用户 shell 设置设置为“git-shell”(...:/home/git:/usr/bin/git-shell),期望 ssh 连接到 git@xxx.xxx.xxx.xxx 的响应将类似于:
fatal: What do you think I am? A shell?
Connection to gitserver closed.
实际的响应是:
$ ssh git@xxx.xxx.xxx.xxx
Linux Debian-70-wheezy-32-minimal 3.2.0-4-686-pae #1 SMP Debian 3.2.46-1+deb7u1 i686
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue Oct 15 00:29:15 2013 from .....
fatal: Interactive git shell is not enabled.
hint: ~/git-shell-commands should exist and have read and execute access.
Connection to xxx.xxx.xxx.xxx closed.
我怎样才能将其更改为另一个 - 正式答案或根本没有答案?
最佳答案
您只需更改 SSH header 。要禁用它,您需要编辑
/etc/ssh/sshd.conf
要进行编辑,您需要执行以下操作
rm /etc/motd
vi /etc/motd
您首先需要删除它,因为它是定期动态创建的
关于linux - 在 Debian 服务器上通过 ssh 连接到 Git 用户时没有(自定义)答案,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19412431/