
私は、ALARM (最新) を搭載した Raspberry PI で SSH サーバーを実行しています。私のユーザー「gitroot」は、git-shell を使用することになっています。しかし、/usr/bin/git-shell
で gitroot のシェルとして を設定すると/etc/passwd
、そのユーザーでログインできなくなります。 はsu - gitroot
期待どおりに動作します。シェルを に変更すると/bin/bash
、ssh 経由で gitroot としてログインできます。
/usr/bin/git-shell
との権限/bin/bash
は同じです。パスワードを変更してみましたが、何も変わりませんでした。 からの出力journalctl -f
:
Jul 23 09:05:27 netberry sshd[4213]: pam_unix(sshd:auth): authentication failure;logname= uid=0 euid=0 tty=ssh ruser= rhost=localhost.localdomai...r=gitroot
Jul 23 09:05:40 netberry sshd[4213]: Failed password for gitroot from 127.0.0.1 port 51969 ssh2
Jul 23 09:07:25 netberry sshd[4213]: Connection closed by 127.0.0.1 [preauth]
Jul 23 09:07:29 netberry sshd[4222]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=localhost.localdomai...r=gitroot
Jul 23 09:07:43 netberry sshd[4222]: Failed password for gitroot from 127.0.0.1 port 51970 ssh2
Jul 23 09:08:07 netberry sshd[4222]: Failed password for gitroot from 127.0.0.1 port 51970 ssh2
Jul 23 09:08:08 netberry sshd[4222]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=localhost.localdomai...r=gitroot
Jul 23 09:08:10 netberry sshd[4222]: Failed password for gitroot from 127.0.0.1 port 51970 ssh2
Jul 23 09:08:10 netberry sshd[4222]: Connection closed by 127.0.0.1 [preauth]
ログには、ホスト自体から ssh 経由で gitroot としてログインしようとする複数の試行が示されています (ssh gitroot@localhost
コンソールに入力しただけです)。
答え1
コメントに記載されているように、 を追加する必要があり/usr/bin/git-shell
ます/etc/shells
。