I am trying to mount a remote file system through sshfs using public key authentication. I am getting this error: execvp: No such file or directory
I can confirm that public key authentication is working with ssh:
ssh -i /home/me/.ssh/myKey [email protected]
Last login: Sun Jan 13 21:25:13 2013 from 192.168.1.2
-bash-3.00$
I can confirm that sshfs is properly mounting the remote directory with password authentication:
sshfs [email protected]:/remote/dir /local/dir -o ssh_command="ssh"
[email protected]'s password:
[[email protected] .ssh]# df -h
Filesystem Size Used Avail Use% Mounted on
...
sshfs#[email protected]:/remote/dir
1000G 0 1000G 0% /local/dir
(I know that the '-o' above isn't necessary. I used it to show that the failure to find ssh
isn't the reason this is failing) But when I try to connect the public key options to the sshfs mount, like so:
sshfs [email protected]:/remote/dir /local/dir -o ssh_command="ssh -i /home/me/.ssh/myKey",sshfs_debug
I get this:
execvp: No such file or directory
on the console and the directory isn't mounted.
I confirmed that "No such file or directory" isn't that it can't find ssh
(and I used /usr/bin/ssh just to be certain) and I confirmed that the path to the key is correct:
ls -al /home/me/.ssh/myKey
-rw------- 1 nobody root 887 Jan 13 20:36 /home/me/.ssh/myKey
The remote host does not have any log file entries on the failed attempts.
I am using the command in the documented manner as far as I can tell, so it should be working, right? The system where this failure occurs is running RHEL5.
Can anyone shed some light on the issue or point me in the right direction? I'm about out of troubleshooting ideas.
The IPs and usernames have been changed to protect the innocent. Sorry if I made typos following copy and paste. I'll fix 'em if any are found.