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

Miklos Szeredi miklos at szeredi.hu
Wed Nov 22 20:22:29 GMT 2006


> 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?

You could try the same with sftp instead of sshfs, to check if it's a
problem in sshfs or something on the server side.

Miklos


More information about the rsync mailing list