How to run sshfs through ssh command?
- by Koryonik
I tried to run sshfs through ssh in one command.
For example, if I do :
$ ssh user@host
user@host$ sshfs host:/src /target
Everything is ok.
Now, if I tried this in one command :
ssh -t "sshfs host:/src /target"
But not mounted point. By using sshfs debug option, it seems volume is mounted and immediately unmounted when ssh connection ended.
I also tried to run sshfs in a login shell, but result is the same when exiting shell :
ssh -t "/bin/sh -l -c sshfs host:/src /target && /bin/sh"
What's wrong ? Is there one another best way?