gpt4 book ai didi

linux - 在 Debian 服务器上通过 ssh 连接到 Git 用户时没有(自定义)答案

转载 作者:太空宇宙 更新时间:2023-11-04 04:10:25 25 4
gpt4 key购买 nike

在设置 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com