標準の手順に従った後でも、パスワードのないSSHを実行することはできません。

標準の手順に従った後でも、パスワードのないSSHを実行することはできません。

私は、Interface(10.1.1.87)とClient-Interface(10.1.1.91)という2つのシステムを持っています。起動時にクライアントインターフェイスでsshfs共有を自動的にマウントしたいと思います。

私は次のコマンドを使用しています:

sshfs [email protected]:/opt/lampp/ /media/CIDrive/ -o allow_other

ところでパスワードを聞いてみますね。パスワードを取り除くために以下を試しました。

  1. rootとしてインターフェイスにログインします。

    # ssh-keygen -t rsa
    # chmod 700 ~/.ssh
    # cat ~/.ssh/id_rsa.pub | ssh [email protected] 'cat > .ssh/authorized_keys'
    
  2. クライアントインターフェイスで、sshd_configファイルに次を追加します。

    RSAAuthentication yes
    PubkeyAuthentication yes
    StrictModes no
    

SSHデーモンを再起動します。それでもパスワードを尋ねます。

root@JMGDDS-Interface:~# ssh -v [email protected]
OpenSSH_5.1p1 Debian-3ubuntu1, OpenSSL 0.9.8g 19 Oct 2007
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to 10.1.1.91 [10.1.1.91] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /root/.ssh/identity type -1
debug1: identity file /root/.ssh/id_rsa type 1
debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048
debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048
debug1: identity file /root/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.1p1 Debian-3ubuntu1
debug1: match: OpenSSH_5.1p1 Debian-3ubuntu1 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.1p1 Debian-3ubuntu1
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host '10.1.1.91' is known and matches the RSA host key.
debug1: Found key in /root/.ssh/known_hosts:2
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Trying private key: /root/.ssh/identity
debug1: Offering public key: /root/.ssh/id_rsa
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: /root/.ssh/id_dsa
debug1: Next authentication method: password
[email protected]'s password:

フォルダの権限は700.sshです。考えられる理由は何ですか?どうすれば解決できますか?.pubauthorized_keys

ベストアンサー1

最近は確認されていませんが、.sshパスに誰でも書き込み可能なディレクトリがある場合、SSHはその中の認証されたキーの使用を拒否します。これらの権限により、他のユーザーがあなたの.sshディレクトリを偽造することができます。

他の人がホームディレクトリに書き込むことができる場合、StrictModesをオフにしないとホームディレクトリは使用されません。

おすすめ記事