cannot get fuse-ssh to operate from a batch script - but does from cmd line

Jason Haar Jason.Haar at trimble.co.nz
Sat Nov 18 22:17:09 GMT 2006


Hi there

I am wanting to call sshfs (auth via DSA keys) via a rsync pre-xfer bash
script, and cannot get something right. If I run it from the cmdline line:

env - sshfs usern at server:/share /dir/path -o -o IdentityFile=/tmp/id_dsa

it mounts it just fine. (note the "env -" - I specifically tested with
no environment to try to make the two situations identical). If I put
that sole line into a "/tmp/test" shell script and run it from the
commandline, or from a cronjob, it also works fine.


However, calling "/tmp/test"  from an rsync-triggered pre-xfer script
(both as root) doesn't work. sshfs reports

read: Connection reset by peer


The remote ssh server shows the successful connection - it shows
"subsystem request for sftp" followed immediately by "session closed for
user usern"

So it appears that it isn't an SSH authentication problem - but
something else. This is on a FC5 box - but I have disabled  SELinux, and
have tried with iptables disabled on both ends too.

Running sshfs with "-o debug -o sshfs_debug"  doesn't really show
anything odd. Obviously it works fine from the cmdline, but from the
rsync script ends with "Connection reset by peer" just as before - with
no good reason why.


I even straced it without much to show. But I do wonder about file
descriptors. Any ideas where I should look next?

FC5, rsync-2.6.9, fuse-2.5.3-5.fc5, fuse-sshfs-1.7-1.fc5

PS: I have worked around it by getting the rsync xfre script to throw
the sshfs mount command out as an "at now" script. That works fine -
it's only when called directly that it fails...

-- 
Cheers

Jason Haar
Information Security Manager, Trimble Navigation Ltd.
Phone: +64 3 9635 377 Fax: +64 3 9635 417
PGP Fingerprint: 7A2E 0407 C9A6 CAF6 2B9F 8422 C063 5EBB FE1D 66D1



More information about the rsync mailing list