How to run sshfs through ssh command?
Posted
by
Koryonik
on Server Fault
See other posts from Server Fault
or by Koryonik
Published on 2014-08-23T08:12:34Z
Indexed on
2014/08/23
10:22 UTC
Read the original article
Hit count: 279
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?
© Server Fault or respective owner