sshd고유 한 구성 파일을 사용하여 권한이없는 포트 (예 : 2222) 에서 두 번째 인스턴스 를 시작하려고 합니다.
분명히 sshd프로세스는 데몬을 setuid실행하는 사용자 이외의 사용자로 로그인 할 수 없습니다 sshd.
그러나 sshd현재 실행중인 사용자 에게 작동하는 작동중인 데몬 을 가질 수 있습니까? 내 유스 케이스의 경우 이것은 좋을 것입니다.
sshd자체 구성 파일과 호스트 키로 인스턴스를 부팅하려고 시도했지만 sshd프로세스가 시작되었지만 (일부 명령과 같이 루트가 아닌 것에 대한 불만은 없음) 해당 포트에 연결하려고하면 sshd프로세스가 종료됩니다.
$ /usr/sbin/sshd -dD -h .ssh/id_rsa -p 2222
debug1: sshd version OpenSSH_5.6p1
debug1: read PEM private key done: type RSA
debug1: private host key: #0 type 1 RSA
debug1: setgroups() failed: Operation not permitted
debug1: rexec_argv[0]='/usr/sbin/sshd'
debug1: rexec_argv[1]='-dD'
debug1: rexec_argv[2]='-h'
debug1: rexec_argv[3]='.ssh/id_rsa'
debug1: rexec_argv[4]='-p'
debug1: rexec_argv[5]='2222'
debug1: Bind to port 2222 on 0.0.0.0.
Server listening on 0.0.0.0 port 2222.
debug1: Bind to port 2222 on ::.
Server listening on :: port 2222.
debug1: fd 6 clearing O_NONBLOCK
debug1: Server will not fork when running in debugging mode.
debug1: rexec start in 6 out 6 newsock 6 pipe -1 sock 9
debug1: inetd sockets after dupping: 5, 5
Connection from ::1 port 57670
debug1: Client protocol version 2.0; client software version OpenSSH_5.6
debug1: match: OpenSSH_5.6 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.6
debug1: list_hostkey_types:
No supported key exchange algorithms
debug1: do_cleanup
debug1: do_cleanup
debug1: audit_event: unhandled event 12
debug1: setgroups() failed: Operation not permitted라인은 분명 튀어하지만 연결을 허용하려고 할 때까지 죽지 않습니다.
UsePam하여 PAM을 비활성화해야 합니다no.