0

私はsshをインストールして動作させました。私は走りましたがsudo chmod -R 777 /var、それは機能しなくなりました。権限を変更しましsudo chmod -R 700 /varたが、再び機能しませんでした。

するとssh -v localhost、次の出力が得られます。

rajat@ubuntu:/$ ssh -v localhost
OpenSSH_5.8p1 Debian-1ubuntu3, OpenSSL 0.9.8o 01 Jun 2010
debug1: Connecting to localhost [127.0.0.1] port 22.
debug1: Connection established.
debug1: identity file /home/rajat/.ssh/id_rsa type -1
debug1: identity file /home/rajat/.ssh/id_rsa-cert type -1
debug1: identity file /home/rajat/.ssh/id_dsa type -1
debug1: identity file /home/rajat/.ssh/id_dsa-cert type -1
debug1: identity file /home/rajat/.ssh/id_ecdsa type -1
debug1: identity file /home/rajat/.ssh/id_ecdsa-cert type -1
ssh_exchange_identification: Connection closed by remote host
rajat@ubuntu:/$ 
4

2 に答える 2

4

OpenSSHは、ファイルとディレクトリのパーミッションと所有権に関しては非常に慎重です。/var少なくともRHEL/CentOSで、その下にある唯一のディレクトリは、 yesに設定されている場合にtoを/var/empty/sshd実行するディレクトリです。chrootUsePrivilegeSeparation

sshd_configこれをファイルに設定します。

UsePrivilegeSeparation no

そして、sshdを再起動して、動作するかどうかを確認します。その場合は、その権限/所有権/var/empty/sshdが問題の原因である可能性があります。

于 2012-01-06T07:02:39.203 に答える