I'm trying to mount a remote directory using sshfs. I've got my .ssh/config
set up so that I can ssh into my user on the remote machine like so
ssh wdev
The remote directory in question (let's suppose it's located at ~/runtime
for the remote user remoteuser
) is pretty large (it's ye old big C++ project, complete with build files and a lot of folders).
From what I've read online, I should be able to mount runtime
to a folder ~/local-mount
(which I've already created) like so:
$ sshfs wdev:/home/myuser/runtime ~/local-mount
However when I run this, there's no output whatsoever. Running sshfs
with the -d
flag is slightly more informative
$ sshfs -d wdev:/home/myuser/runtime ~/local-mount
FUSE library version: 2.9.7
nullpath_ok: 0
nopath: 0
utime_omit_ok: 0
However at this point the output stops. What's more, it seems to freeze up other things too. If I open up another shell and try to ls ~/local-mount
, it just stays suspended until I interrupt with Ctrl+c
. This happens even if I just trigger autocompletion on the directory name from my shell
ls ~/loca<TAB>
nautilus
won't even open. All these symptoms persist until I interrupt the process running sshfs
, at which point everything resumes normally. Can someone help me with getting this to run properly?
I should note that while mangling the hostname in the sshfs
command will immediately yield an error, I can mangle the remote folder name however I want and I'll still get the same behavior
For what it's worth, I've attached my ~/.ssh/config
below. My connections to wdev
actually get forwarded through the proxy wsl
, if it's relevant
# --- init_sd_card generated ---
# Use the key for all hosts
IdentityFile /home/local_user/.ssh/id_rsa
Host wsl
User remote-user
HostName 10.0.0.211
Port 2222
# https://superuser.com/questions/107679/forward-ssh-traffic-through-a-middle-machine
Host wdev
User remote-user
HostName 10.240.115.106
ProxyCommand ssh wsl -C -W %h:%p