I have two systems named Interface(10.1.1.87) and Client-Interface(10.1.1.91). I want to automatically mount an sshfs share from Client-Interface on Interface on boot.
I am using the command:
sshfs mc@10.1.1.91:/opt/lampp/ /media/CIDrive/ -o allow_other
But it asks for my password. I tried the following to make it password-less:
As root on Interface:
# ssh-keygen -t rsa # chmod 700 ~/.ssh # cat ~/.ssh/id_rsa.pub | ssh mc@10.1.1.91 'cat > .ssh/authorized_keys'On Client-Interface I added to the
sshd_configfile:RSAAuthentication yes PubkeyAuthentication yes StrictModes no
and restarted the SSH daemon. Nonetheless, it is still asking for the password:
root@JMGDDS-Interface:~# ssh -v mc@10.1.1.91
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
mc@10.1.1.91's password:
The permission for the .ssh folder is 700; .pub and authorized_keys are 600. What could be the possible cause? How can I fix it?
10.1.1.91, and if so, could you post the relevant parts? – Chris Down Sep 20 '11 at 19:42ssh_copy_id? It should take care of all permissions and oddities. – Marco Ceppi Sep 20 '11 at 20:06ssh -dorssh -dd. You'll see a lot of logs. If you decide to post them, be careful, there'll be a little private information here and there. – Gilles 'SO- stop being evil' Sep 21 '11 at 00:03