사용자 일치 지시어를 무시하는 Windows용 OpenSSH

사용자 일치 지시어를 무시하는 Windows용 OpenSSH

나는 OpenSSH에 사용하고 있습니다 Windows 7.7p1. Windows 1903나는 Match User xxxxin sshd_configfile, in을 사용하여 몇 가지 다른 지시어를 제외하고 Program Data -> SSHxxxx의 루트 디렉터리를 의 다른 경로로 변경했습니다 .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동일한 홈 사용자 프로필이 열립니다. SecureFXSFTP 클라이언트 로 이것을 시도하고 있습니다 .

관련 정보