パスワードのないSSHアクセスは拒否されたメッセージを処理できません。

パスワードのないSSHアクセスは拒否されたメッセージを処理できません。

2つのLinuxホスト間でSSHパスワードなしのアクセスを確立しました。ただし、パスワードのないアクセスは機能しません。以下のように拒否メッセージとともに認証が取り消されます。

  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

/var/log/secureターゲットホストで次の情報を表示できます。

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ユーザーはターゲットホストのchroot状態です。

-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

wsync以下は、ターゲットホストのユーザーの設定です。

     $ sudo grep -A 2 wsync /etc/ssh/sshd_config
      Match User wsync
      ChrootDirectory /home/chroot
      ForceCommand /home/bin/validate-rsync.sh

/etc/securetty必要に応じて出力

$ sudo grep tty /etc/securetty
tty1
tty2
tty3
tty4
tty5
tty6
tty7
tty8
tty9
tty10
tty11

何が問題なのか教えてください。

ベストアンサー1

おすすめ記事