在设置Git Server(在最新的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.
我怎么能把这个改成另一个 - 正式答案或者根本没有答案?
答案 0 :(得分:0)
您只需要更改SSH标头即可。要禁用它,您需要编辑
/etc/ssh/sshd.conf
要进行编辑,您需要执行以下操作
rm /etc/motd
vi /etc/motd
首先需要将其删除,否则会定期动态创建