
私はでOpenSSH
for を使用しています。他のいくつかのディレクティブとは別に、で inファイルを使用して、xxxx のルート ディレクトリを 内の別のパスに変更しました。Windows 7.7p1
Windows 1903
Match User xxxx
sshd_config
Program Data -> SSH
filesystem
この方法は以前のバージョンでは正常に機能しており、このユーザーを使用して接続し、変更されたルート ディレクトリに移動することができました。
新しい安定バージョンでは、このMatch User
指示は尊重されていないようです。
ログを見るとsshd
、こうなっています...
26948 2019-09-30 15:10:29.745 debug1: userauth-request for user TestLocalAccount service ssh-connection method none [preauth]
26948 2019-09-30 15:10:29.745 debug1: attempt 0 failures 0 [preauth]
26948 2019-09-30 15:10:29.745 debug3: mm_getpwnamallow entering [preauth]
26948 2019-09-30 15:10:29.745 debug3: mm_request_send entering: type 8 [preauth]
26948 2019-09-30 15:10:29.745 debug3: mm_getpwnamallow: waiting for MONITOR_ANS_PWNAM [preauth]
26948 2019-09-30 15:10:29.745 debug3: mm_request_receive_expect entering: type 9 [preauth]
26948 2019-09-30 15:10:29.745 debug3: mm_request_receive entering [preauth]
26948 2019-09-30 15:10:29.745 debug3: mm_request_receive entering
26948 2019-09-30 15:10:29.745 debug3: monitor_read: checking request 8
26948 2019-09-30 15:10:29.745 debug3: mm_answer_pwnamallow
26948 2019-09-30 15:10:29.745 debug2: parse_server_config: config reprocess config len 297
26948 2019-09-30 15:10:29.745 debug3: checking match for 'User TestLocalAccount' user testlocalaccount host 127.0.0.1 addr 127.0.0.1 laddr 127.0.0.1 lport 22
26948 2019-09-30 15:10:29.745 debug3: match not found
26948 2019-09-30 15:10:29.745 debug3: mm_answer_pwnamallow: sending MONITOR_ANS_PWNAM: 1
26948 2019-09-30 15:10:29.745 debug3: mm_request_send entering: type 9
これらのログは -
26948 2019-09-30 15:10:29.745 debug2: parse_server_config: config reprocess config len 297
26948 2019-09-30 15:10:29.745 debug3: checking match for 'User TestLocalAccount' user testlocalaccount host 127.0.0.1 addr 127.0.0.1 laddr 127.0.0.1 lport 22
26948 2019-09-30 15:10:29.745 debug3: match not found
Match User
にディレクティブがない場合には表示されませんsshd_config
。少なくとも、設定ファイルの変更が考慮されるという事実は、これが正しいファイルであることを示しているようです (Prog Files -> OpenSSH には別の sshd_config_default があります)。
sshd_configの関連セクションは次のようになります -
# override default of no subsystems
Subsystem sftp sftp-server.exe
Match User TestLocalAccount
ChrootDirectory C:\Users\TestLocalAccount\Downloads
PubKeyAuthentication yes
セクション内のディレクティブはどれもMatch user
尊重されません。 セッションを開くと、TestLocalAccount
同じホーム ユーザー プロファイルが開きます。 私はこれをSecureFX
SFTP クライアントで試しています。