Sto cercando di avviare una seconda sshdistanza su una porta non privilegiata (ad es. 2222) con il mio file di configurazione.
Ovviamente, il sshdprocesso non è in grado di setuidaccedere come utenti diversi da quello che esegue il sshddemone è chiaramente impossibile.
Tuttavia, è possibile avere un sshddemone funzionante che funzionerà per l'utente attualmente in esecuzione? Per il mio caso d'uso, questo andrebbe bene.
Ho provato ad avviare sshdun'istanza con il mio file di configurazione e la mia chiave host e il sshdprocesso si avvia (nessuna lamentela sul non essere root, come alcuni comandi), tuttavia quando provo a connettermi a quella porta, il sshdprocesso si interrompe.
$ /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
La debug1: setgroups() failed: Operation not permittedlinea ovviamente sporge, ma non muore finché non tenta di accettare una connessione.
UsePamsuno.