Eu configuro o acesso sem senha SSH entre dois hosts Linux. Mas o acesso sem senha não está funcionando. A autenticação é cancelada com uma mensagem rejeitada, conforme mostrado abaixo
su - wsync
-bash-4.1$ ssh node-x3
debug1: Authentication succeeded (publickey).
debug1: channel 0: new [client-session]
debug1: Requesting [email protected]
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LANG = en_US.UTF-8
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: client_input_channel_req: channel 0 rtype [email protected] reply 0
Rejected
debug1: channel 0: free: client-session, nchannels 1
Connection to node-x3 closed.
Transferred: sent 2760, received 3504 bytes, in 0.5 seconds
Bytes per second: sent 5997.7, received 7614.5
debug1: Exit status 0
A seguir pode ser vista em /var/log/secure
no host de destino
Jul 1 18:49:23 syd-fs-x3 sshd[17261]: pam_unix(sshd:session): session opened for user wsync by (uid=0)
Jul 1 18:49:23 syd-fs-x3 sshd[17266]: error: open /dev/tty failed - could not set controlling tty: Permission denied
Jul 1 18:49:24 syd-fs-x3 sshd[17265]: Received disconnect from 10.200.X.X: 11: disconnected by user
Jul 1 18:49:24 syd-fs-x3 sshd[17261]: pam_unix(sshd:session): session closed for user wsync
wsync
user é chroot no host de destino
-bash-4.1$ pwd
/home/chroot/home/wsync
$ ls -l /home/chroot/dev/tty
crw-rw-rw- 1 root root 5, 0 Nov 30 2015 /home/chroot/dev/tty
Seguir as configurações do usuário wsync
no host de destino.
$ sudo grep -A 2 wsync /etc/ssh/sshd_config
Match User wsync
ChrootDirectory /home/chroot
ForceCommand /home/bin/validate-rsync.sh
/etc/securetty
output conforme solicitado
$ sudo grep tty /etc/securetty
tty1
tty2
tty3
tty4
tty5
tty6
tty7
tty8
tty9
tty10
tty11
Por favor, deixe-me saber qual é o problema?