0

At setup of Git Server (on latest Debian), I've set the git user shell setting to "git-shell" (...:/home/git:/usr/bin/git-shell) with the expectation that the response at the ssh connection to the git@xxx.xxx.xxx.xxx will be something like:

fatal: What do you think I am? A shell?
Connection to gitserver closed.

Instead the actual response is:

$ 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.

How could I change this to another - formal answer or no answer at all instead?

4

1 回答 1

0

您只需要更改 SSH 标头。要禁用它,您需要编辑

/etc/ssh/sshd.conf

对于编辑,您需要执行以下操作

rm /etc/motd
vi /etc/motd

您首先需要删除它,否则它会定期动态创建

于 2013-10-16T20:00:05.663 回答